From ae285a3f9baf3d708212324c37d65aeb78fa2e2b Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 25 Nov 2022 17:54:44 +0000 Subject: [PATCH] Suppress errors when validation regexps --- src/Psalm/Config/FileFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;