From 8f1bb04d8d351e4060f132c4445eaa1e0ad7c108 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 2 Mar 2021 01:23:55 +0300 Subject: [PATCH] correct variable name --- .../libraries/rules/errorreporting.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/administrator/components/com_jedchecker/libraries/rules/errorreporting.php b/administrator/components/com_jedchecker/libraries/rules/errorreporting.php index df8dedb..93ffa1f 100644 --- a/administrator/components/com_jedchecker/libraries/rules/errorreporting.php +++ b/administrator/components/com_jedchecker/libraries/rules/errorreporting.php @@ -81,20 +81,16 @@ class JedcheckerRulesErrorreporting extends JEDcheckerRule $content = (array) file($file); // Get the functions to look for - $encodings = explode(',', $this->params->get('errorreportings')); - - foreach ($encodings as $i => $encoding) - { - $encodings[$i] = trim($encoding); - } + $errorreportings = explode(',', $this->params->get('errorreportings')); + $errorreportings = array_map('trim', $errorreportings); $found = false; foreach ($content as $i => $line) { - foreach ($encodings as $encoding) + foreach ($errorreportings as $errorreporting) { - $pos_1 = stripos($line, $encoding); + $pos_1 = stripos($line, $errorreporting); if ($pos_1 !== false) {