Skip to content

Commit

Permalink
Suppress errors when validation regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-teck committed Nov 25, 2022
1 parent a0e4468 commit ae285a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Config/FileFilter.php
Expand Up @@ -434,7 +434,7 @@ public static function loadFromXMLElement(
private static function isRegularExpression(string $string): bool
{
set_error_handler(
static fn(): bool => false,
static fn(): bool => true,
E_WARNING
);
$is_regexp = preg_match($string, '') !== false;
Expand Down

0 comments on commit ae285a3

Please sign in to comment.