33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-26 23:06:32 +00:00

Fix conflict of variables

This commit is contained in:
Denis Ryabov 2023-09-05 21:15:56 +04:00
parent 747f62b15d
commit 5b426de6c5

View File

@ -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;
}