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, over 1 year ago
Updated 8 March 2024, 7 months 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

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Viewsย  โ†’

Last updated about 15 hours ago

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium DuneBL

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024