Deprecated function: mb_strlen(): Passing null to parameter #1

Created on 7 September 2023, 10 months ago

If you are on php 8.x, you may see this error: Deprecated function: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Unicode::truncate() (line 313 of core/lib/Drupal/Component/Utility/Unicode.php).

This happens if null is passed as the first parameter to Unicode::truncate();.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada dshields

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

Comments & Activities

  • Issue created by @dshields
  • Status changed to Needs review 10 months ago
  • πŸ‡¨πŸ‡¦Canada dshields

    This patch checks to make sure values are set before passing them to Unicode:truncate();

Production build 0.69.0 2024