From d3588225db2b79c9704e782d9d3cb85873b5dec7 Mon Sep 17 00:00:00 2001 From: Taylor Vance <33555535+taylorvance@users.noreply.github.com> Date: Wed, 18 Dec 2024 09:19:19 -0600 Subject: [PATCH] Use explicit nullable type for PHP 8.4 Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead --- src/MbWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MbWrapper.php b/src/MbWrapper.php index 34830de..31acd5a 100644 --- a/src/MbWrapper.php +++ b/src/MbWrapper.php @@ -342,7 +342,7 @@ private function iconvStrlen(string $str, string $charset) : int return $ret; } - private function iconvSubstr(string $str, string $charset, int $start, int $length = null) : string + private function iconvSubstr(string $str, string $charset, int $start, ?int $length = null) : string { $ret = @\iconv_substr($str, $start, $length, $charset . '//TRANSLIT//IGNORE'); if ($ret === false) {