Skip to content

Commit bd7e3b9

Browse files
committed
Merge branch 'improvement/preg_split_in_smaller_chunks' into testing-2022
2 parents 8c3b1f2 + e17f878 commit bd7e3b9

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
@@ -535,7 +535,7 @@ private function strsplit($sString)
535535
$aResult = [];
536536
for ($iOffset = 0; $iOffset < $iLength; $iOffset += $iLimit) {
537537
$sChunk = mb_substr($sString, $iOffset, $iLimit, 'utf-8');
538-
foreach (preg_split('//u', $sChunk, null, PREG_SPLIT_NO_EMPTY) as $sChar) {
538+
foreach (preg_split('//u', $sChunk, -1, PREG_SPLIT_NO_EMPTY) as $sChar) {
539539
$aResult[] = $sChar;
540540
}
541541
}

0 commit comments

Comments
 (0)