From 5b426de6c570a3dea1dc3ed0526002da891b9853 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 5 Sep 2023 21:15:56 +0400 Subject: [PATCH] Fix conflict of variables --- .../com_jedchecker/libraries/rules/framework.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/administrator/components/com_jedchecker/libraries/rules/framework.php b/administrator/components/com_jedchecker/libraries/rules/framework.php index 65969d3..9c4fbe7 100644 --- a/administrator/components/com_jedchecker/libraries/rules/framework.php +++ b/administrator/components/com_jedchecker/libraries/rules/framework.php @@ -293,11 +293,11 @@ class JedcheckerRulesFramework extends JEDcheckerRule $newTest->kind = $test; $newTest->tests = array(); - foreach (explode(",", $this->params->get($group)) as $test) + foreach (explode(",", $this->params->get($group)) as $match) { - if (strpos($test, '=>') !== false) + if (strpos($match, '=>') !== false) { - list($test, $replacement) = explode('=>', $test, 2); + list($match, $replacement) = explode('=>', $match, 2); } else { @@ -305,10 +305,10 @@ class JedcheckerRulesFramework extends JEDcheckerRule } $testObj = new stdClass; - $testObj->test = $test; - $testObj->regex = $this->generateRegex($test); + $testObj->test = $match; + $testObj->regex = $this->generateRegex($match); $testObj->replacement = $replacement; - $testObj->keepStrings = strpos($test, "'") !== false; + $testObj->keepStrings = strpos($match, "'") !== false; $newTest->tests[] = $testObj; }