From e3ac706e725df2dc4ddb20ea0946d6e8168ca7a7 Mon Sep 17 00:00:00 2001 From: orklah Date: Mon, 7 Dec 2020 18:35:05 +0100 Subject: [PATCH] fix bug --- hooks/InsaneComparisonAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/InsaneComparisonAnalyzer.php b/hooks/InsaneComparisonAnalyzer.php index ded6f5c..45eb0b4 100644 --- a/hooks/InsaneComparisonAnalyzer.php +++ b/hooks/InsaneComparisonAnalyzer.php @@ -105,7 +105,7 @@ class InsaneComparisonAnalyzer implements AfterExpressionAnalysisInterface $eligible_string = null; foreach ($string_operand->getAtomicTypes() as $possibly_string) { if ($possibly_string instanceof TLiteralString) { - if(!preg_match('#\D#', $possibly_string->value[0] ?? '')) { + if(preg_match('#\D#', $possibly_string->value[0] ?? '')) { $eligible_string = $possibly_string; break; }