diff --git a/source/administrator/components/com_jedchecker/libraries/rules/framework.ini b/source/administrator/components/com_jedchecker/libraries/rules/framework.ini index fa18d87..d70c8fc 100755 --- a/source/administrator/components/com_jedchecker/libraries/rules/framework.ini +++ b/source/administrator/components/com_jedchecker/libraries/rules/framework.ini @@ -32,6 +32,6 @@ todo="@TODO" compatibility_groups="notinj3,deprecated,jerr,DS,strict" notinj3="JUtility::isWinOS,JFTP,JLDAP,JWebClient,JloadResultArray,nameQuote,JRequest::checkToken,JParameter,JElement,JFormFieldEditors,JHtmlImage,JRules,JSimpleXML,JPane,$db->getEscaped,JDate::toMysql,JUtility::sendMail,JUtility::sendAdminMail,JUtility::getToken,JFactory::getXMLParser,JDate::toMysql" deprecated="JHtmlBehavior::mootools,JRequest,::assignRef" -jerr="JError" +jerr="JError::" DS=" DS ,.DS., DS.,.DS " strict="&JFactory,&JModuleHelper" diff --git a/source/administrator/components/com_jedchecker/libraries/rules/framework.php b/source/administrator/components/com_jedchecker/libraries/rules/framework.php index 31dd47c..870c8a6 100755 --- a/source/administrator/components/com_jedchecker/libraries/rules/framework.php +++ b/source/administrator/components/com_jedchecker/libraries/rules/framework.php @@ -132,12 +132,9 @@ class JedcheckerRulesFramework extends JEDcheckerRule { foreach ($testObject->tests AS $singleTest) { - // Detect the $singleTest string, but only if it's not between single or double-quotes - // This is to avoid false positive such as JText::_('JERROR_ALERTNOAUTHOR') which matched JError - $regex = "/'[^']+'(*SKIP)(*F)|\"[^']+\"(*SKIP)(*F)|" . $singleTest . "/"; - if (preg_match($regex, $line) !== 0) + if (stripos($line, $singleTest) !== false) { - $line = preg_replace($regex, '' . $singleTest . '', $line); + $line = str_ireplace($singleTest, '' . $singleTest . '', $line); $error_message = JText::_('COM_JEDCHECKER_ERROR_FRAMEWORK_' . strtoupper($testObject->group)) . ':
' . $line . '
'; switch ($testObject->kind)