Passing null to parameter #1 ($string) of type string is deprecated

Created on 14 November 2023, 8 months ago

Problem/Motivation

This module is testing whether a string is empty by running it through `drupal_strlen` and checking if the result is greater than zero. Sending null through this function is deprecated in recent versions of PHP. We can just use `empty` as a replacement.

This error was traced back to this module:

> “Deprecated function: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in drupal_strlen() (line 482 of /code/includes/unicode.inc).”

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇸United States laryn

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

Comments & Activities

Production build 0.69.0 2024