Skip to content

Commit

Permalink
Merge pull request #8766 from Chi-teck/regexp-validation
Browse files Browse the repository at this point in the history
Suppress errors when validation regexps
  • Loading branch information
orklah committed Nov 25, 2022
2 parents b9a532d + ae285a3 commit 45ed177
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 45ed177

Please sign in to comment.