From c40986f8fdd5a3e89277b0869d081902d1511932 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 27 Dec 2024 10:45:41 +0700 Subject: [PATCH] refactor: more !== 1 compare on preg_match() --- system/View/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/View/Parser.php b/system/View/Parser.php index 80af795bceb8..f5ca9b56b128 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -613,7 +613,7 @@ public function shouldAddEscaping(string $key) $escape = false; } // If no `esc` filter is found, then we'll need to add one. - elseif (in_array(preg_match('/\s+esc/u', $key), [0, false], true)) { + elseif (preg_match('/\s+esc/u', $key) !== 1) { $escape = 'html'; }