Skip to content

Commit 2c397c3

Browse files
committed
Fix PHP 8.1 compatibility in ParserState::strsplit()
> Error Message: preg_split(): Passing null to parameter MyIntervals#3 ($limit) of type int is deprecated see MyIntervals#338 (cherry picked from commit 84b3ba7)
1 parent d217848 commit 2c397c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sabberworm/CSS/Parsing/ParserState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ private function strtolower($sString) {
282282
private function strsplit($sString) {
283283
if ($this->oParserSettings->bMultibyteSupport) {
284284
if ($this->streql($this->sCharset, 'utf-8')) {
285-
return preg_split('//u', $sString, null, PREG_SPLIT_NO_EMPTY);
285+
return preg_split('//u', $sString, -1, PREG_SPLIT_NO_EMPTY);
286286
} else {
287287
$iLength = mb_strlen($sString, $this->sCharset);
288288
$aResult = array();
@@ -307,4 +307,4 @@ private function strpos($sString, $sNeedle, $iOffset) {
307307
return strpos($sString, $sNeedle, $iOffset);
308308
}
309309
}
310-
}
310+
}

0 commit comments

Comments
 (0)