Skip to content

Commit

Permalink
Passing null to parameter of type string is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
kiamlaluno committed Dec 18, 2022
1 parent 516d213 commit b70a425
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/includes/unicode.inc
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function decode_entities($text) {
*
* This is less than or equal to the byte count.
*
* @param $text
* @param string $text
* The string to run the operation on.
*
* @return integer
Expand All @@ -477,6 +477,9 @@ function decode_entities($text) {
*/
function backdrop_strlen($text) {
global $multibyte;
if (!isset($text)) {
return 0;
}
if ($multibyte == UNICODE_MULTIBYTE) {
return mb_strlen($text);
}
Expand All @@ -485,7 +488,6 @@ function backdrop_strlen($text) {
return strlen(preg_replace("/[\x80-\xBF]/", '', $text));
}
}

/**
* Uppercase a UTF-8 string.
*
Expand Down

0 comments on commit b70a425

Please sign in to comment.