Skip to content

Commit 46cf4ff

Browse files
committed
Assert: improved exception message
1 parent f7328f7 commit 46cf4ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Framework/Assert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ public static function isMatching(string $pattern, string $actual, bool $strict
550550
$res = preg_match($pattern, (string) $actual);
551551
ini_set('pcre.backtrack_limit', $old);
552552
if ($res === false || preg_last_error()) {
553-
throw new \Exception('Error while executing regular expression. (PREG Error Code ' . preg_last_error() . ')');
553+
throw new \Exception('Error while executing regular expression. (' . preg_last_error_msg() . ')');
554554
}
555555

556556
return (bool) $res;

0 commit comments

Comments
 (0)