mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-17 02:25:10 +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
|
// Load file and strip comments
|
||||||
$content = php_strip_whitespace($file);
|
$content = php_strip_whitespace($file);
|
||||||
|
|
||||||
|
// Strip BOM (it is checked separately)
|
||||||
|
$content = preg_replace('/^\xEF\xBB\xBF/', '', $content);
|
||||||
|
|
||||||
// Skip empty files
|
// Skip empty files
|
||||||
if ($content === '' || preg_match('#^<\?php\s+$#', $content))
|
if ($content === '' || preg_match('#^<\?php\s+$#', $content))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user