Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\views\Plugin\views\PluginBase->viewsTokenReplace()

Created on 23 February 2023, about 2 years ago

Here is the web/core/modules/views/src/Plugin/views/PluginBase.php::viewsTokenReplace() function:

  protected function viewsTokenReplace($text, $tokens) {
    if (!strlen($text)) {
      // No need to run filterAdmin on an empty string.
      return '';
    }
     ....

The !strlen($text) check is made to check if $text is empty or null
This is deprecated in php 8.1

maybe we can replace by:

  protected function viewsTokenReplace($text, $tokens) {
    if (!$text) {
      // No need to run filterAdmin on an empty string.
      return '';
    }
     ....
๐Ÿ› Bug report
Status

Active

Version

9.5

Component
Viewsย  โ†’

Last updated 14 minutes ago

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium DuneBL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024