Skip to content

Commit

Permalink
Fix PHP 8.1 compatibility in ParserState::strsplit()
Browse files Browse the repository at this point in the history
> Error Message: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated

see MyIntervals#338
  • Loading branch information
TimWolla authored and raxbg committed Sep 15, 2022
1 parent 530fc94 commit 58bd3c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ private function strsplit($sString)
{
if ($this->oParserSettings->bMultibyteSupport) {
if ($this->streql($this->sCharset, 'utf-8')) {
return preg_split('//u', $sString, null, PREG_SPLIT_NO_EMPTY);
return preg_split('//u', $sString, -1, PREG_SPLIT_NO_EMPTY);
} else {
$iLength = mb_strlen($sString, $this->sCharset);
$aResult = [];
Expand Down

0 comments on commit 58bd3c5

Please sign in to comment.