From 7edc17b3bedfa6312ae0fb9d21e2a33de1270745 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 31 Aug 2021 11:51:44 +0300 Subject: [PATCH] remove error level for BOM --- .../com_jedchecker/libraries/rules/language.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/administrator/components/com_jedchecker/libraries/rules/language.php b/administrator/components/com_jedchecker/libraries/rules/language.php index 242821d..037b56e 100644 --- a/administrator/components/com_jedchecker/libraries/rules/language.php +++ b/administrator/components/com_jedchecker/libraries/rules/language.php @@ -113,17 +113,9 @@ class JedcheckerRulesLanguage extends JEDcheckerRule // Check for BOM sequence 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); }