mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-05 15:32:10 +00:00
remove error level for BOM
This commit is contained in:
parent
c9e3cc1a62
commit
7edc17b3be
@ -112,18 +112,10 @@ class JedcheckerRulesLanguage extends JEDcheckerRule
|
|||||||
|
|
||||||
// Check for BOM sequence
|
// Check for BOM sequence
|
||||||
if ($lineno === 0 && strncmp($line, "\xEF\xBB\xBF", 3) === 0)
|
if ($lineno === 0 && strncmp($line, "\xEF\xBB\xBF", 3) === 0)
|
||||||
{
|
|
||||||
// Report as an error if BOM is directly followed by key name (and become a part of the name)
|
|
||||||
if (isset($line[3]) && strpos(";\n\r", $line[3]) === false)
|
|
||||||
{
|
|
||||||
$this->report->addError($file, JText::_('COM_JEDCHECKER_LANG_BOM_FOUND'), $startLineno);
|
|
||||||
}
|
|
||||||
else // Otherwise report a warning
|
|
||||||
{
|
{
|
||||||
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_LANG_BOM_FOUND'), $startLineno);
|
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_LANG_BOM_FOUND'), $startLineno);
|
||||||
}
|
|
||||||
|
|
||||||
// Romeve BOM for further checks
|
// Remove BOM for further checks
|
||||||
$line = substr($line, 3);
|
$line = substr($line, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user