mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-15 17:47:11 +00:00
don't search for JEXEC guard in comments
This commit is contained in:
parent
21faa210dc
commit
0a09a14fb3
@ -77,7 +77,16 @@ class JedcheckerRulesJexec extends JEDcheckerRule
|
||||
*/
|
||||
protected function find($file)
|
||||
{
|
||||
$content = (array) file($file);
|
||||
// load file and strip comments
|
||||
$content = php_strip_whitespace($file);
|
||||
|
||||
// skip empty files
|
||||
if ($content === '' || preg_match('#^<\?php\s+$#', $content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$content = preg_split('/(?:\r\n|\n|\r)(?!$)/', $content);
|
||||
|
||||
// Get the constants to look for
|
||||
$defines = $this->params->get('constants');
|
||||
|
Loading…
Reference in New Issue
Block a user