Skip to content

Commit 4362bf2

Browse files
committed
Fix PHP 8.4 deprecation: Use explicit nullable type for substr $length parameter
1 parent 9eb7616 commit 4362bf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rule/AbstractStrlen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function strlenIconv(string $str): int
138138
* @return string
139139
*
140140
*/
141-
protected function substr(string $str, int $start, int $length = null): string
141+
protected function substr(string $str, int $start, ?int $length = null): string
142142
{
143143
if ($this->iconv()) {
144144
return $this->substrIconv($str, $start, $length);

0 commit comments

Comments
 (0)