diff --git a/src/Psalm/Config/FileFilter.php b/src/Psalm/Config/FileFilter.php index 2d3187e7462..74b9d25c914 100644 --- a/src/Psalm/Config/FileFilter.php +++ b/src/Psalm/Config/FileFilter.php @@ -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;