33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-05 21:07:57 +00:00

Fix possible warning on empty php files

This commit is contained in:
Denis Ryabov 2021-05-09 18:44:08 +03:00
parent 1b2bdbe41e
commit 72c8ed99ef

View File

@ -128,6 +128,12 @@ class JedcheckerRulesFramework extends JEDcheckerRule
protected function find($file)
{
$origContent = (array) file($file);
if (count($origContent) === 0)
{
return false;
}
$cleanContent = preg_split("/(?:\r\n|\n|\r)(?!$)/", $this->cleanNonCode($file));
$result = false;