Skip to content

Commit e17f878

Browse files
committed
PHP 8 compatibility in preg_split
1 parent 7b7b311 commit e17f878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Parsing/ParserState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ private function strsplit($sString)
513513
$aResult = [];
514514
for ($iOffset = 0; $iOffset < $iLength; $iOffset += $iLimit) {
515515
$sChunk = mb_substr($sString, $iOffset, $iLimit, 'utf-8');
516-
foreach (preg_split('//u', $sChunk, null, PREG_SPLIT_NO_EMPTY) as $sChar) {
516+
foreach (preg_split('//u', $sChunk, -1, PREG_SPLIT_NO_EMPTY) as $sChar) {
517517
$aResult[] = $sChar;
518518
}
519519
}

0 commit comments

Comments
 (0)