mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-11 07:41:04 +00:00
Detected an solved side effects caused by the previous commit
This commit is contained in:
parent
060faec757
commit
f92adcf367
@ -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"
|
||||
|
@ -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, '<b>' . $singleTest . '</b>', $line);
|
||||
$line = str_ireplace($singleTest, '<b>' . $singleTest . '</b>', $line);
|
||||
$error_message = JText::_('COM_JEDCHECKER_ERROR_FRAMEWORK_' . strtoupper($testObject->group)) . ':<pre>' . $line . '</pre>';
|
||||
|
||||
switch ($testObject->kind)
|
||||
|
Loading…
Reference in New Issue
Block a user