Problem/Motivation
When visiting the crop type listing (/admin/config/media/crop), for every crop type without a description the following warning is shown:
Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Unicode::validateUtf8() (line 395 of core/lib/Drupal/Component/Utility/Unicode.php).
Steps to reproduce
This deprecation only shows when using PHP 8.1+.
Proposed resolution
Pass an empty string to Xss::filterAdmin() if $entity->description is NULL.
Issue fork crop-3436966
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dieterholvoet commentedComment #4
dieterholvoet commentedComment #5
dieterholvoet commentedComment #6
tart0Patch tested, this fix the issue, thanks !
Comment #7
phenaproximaComment #9
phenaproximaLooks good to me. Merged into 8.x-2.x.