mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-03 22:57:21 +00:00
clean BOM before JEXEC check
This commit is contained in:
parent
f6df5dc520
commit
266ab63780
@ -103,6 +103,9 @@ class JedcheckerRulesJexec extends JEDcheckerRule
|
||||
// Load file and strip comments
|
||||
$content = php_strip_whitespace($file);
|
||||
|
||||
// Strip BOM (it is checked separately)
|
||||
$content = preg_replace('/^\xEF\xBB\xBF/', '', $content);
|
||||
|
||||
// Skip empty files
|
||||
if ($content === '' || preg_match('#^<\?php\s+$#', $content))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user