mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Suppress errors when validation regexps
This commit is contained in:
parent
a0e4468a9a
commit
ae285a3f9b
@ -434,7 +434,7 @@ class FileFilter
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user