Skip to content

Commit

Permalink
Enhance error handling in StaticPrefixCollection for compatibility wi…
Browse files Browse the repository at this point in the history
…th libpcre2-10.43

The error handling function in the StaticPrefixCollection class has been extended. A new check for 'Compilation failed: length of lookbehind assertion is not limited' message error was added to improve the error capture process.
  • Loading branch information
Lustmored committed Feb 27, 2024
1 parent 86c5a06 commit 48ae43e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Matcher/Dumper/StaticPrefixCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private function getCommonPrefix(string $prefix, string $anotherPrefix): array

public static function handleError(int $type, string $msg)
{
return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length');
return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length')
|| str_contains($msg, 'Compilation failed: length of lookbehind assertion is not limited');
}
}

0 comments on commit 48ae43e

Please sign in to comment.