mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-16 10:05:14 +00:00
Mitigate unquoted strings error to a warning
This commit is contained in:
parent
13a1237d6b
commit
86e03fec05
@ -248,21 +248,21 @@ class JedcheckerRulesLanguage extends JEDcheckerRule
|
|||||||
// Check for unquoted values
|
// Check for unquoted values
|
||||||
if (strlen($value) < 2 || ($value[0] !== '"' && substr($value, -1) !== '"'))
|
if (strlen($value) < 2 || ($value[0] !== '"' && substr($value, -1) !== '"'))
|
||||||
{
|
{
|
||||||
$this->report->addError($file, JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES'), $startLineno, $line);
|
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES'), $startLineno, $line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value[0] !== '"')
|
if ($value[0] !== '"')
|
||||||
{
|
{
|
||||||
$msg = JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES') . ' ' . JText::_('COM_JEDCHECKER_LANG_TRANSLATION_MISSED_LEFT_QUOTE');
|
$msg = JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES') . ' ' . JText::_('COM_JEDCHECKER_LANG_TRANSLATION_MISSED_LEFT_QUOTE');
|
||||||
$this->report->addError($file, $msg, $startLineno, $line);
|
$this->report->addWarning($file, $msg, $startLineno, $line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($value, -1) !== '"')
|
if (substr($value, -1) !== '"')
|
||||||
{
|
{
|
||||||
$msg = JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES') . ' ' . JText::_('COM_JEDCHECKER_LANG_TRANSLATION_MISSED_RIGHT_QUOTE');
|
$msg = JText::_('COM_JEDCHECKER_LANG_TRANSLATION_QUOTES') . ' ' . JText::_('COM_JEDCHECKER_LANG_TRANSLATION_MISSED_RIGHT_QUOTE');
|
||||||
$this->report->addError($file, $msg, $startLineno, $line);
|
$this->report->addWarning($file, $msg, $startLineno, $line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user