33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2025-01-03 22:57:21 +00:00

fix loop through children nodes

This commit is contained in:
Denis Ryabov 2021-02-24 00:06:02 +03:00
parent 216e482009
commit 5fafb747f0

View File

@ -109,7 +109,9 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
else else
{ {
$extension = (string) $xml->name; $extension = (string) $xml->name;
foreach ($xml->files->children as $child) if (isset($xml->files))
{
foreach ($xml->files->children() as $child)
{ {
if (isset($child[$type])) if (isset($child[$type]))
{ {
@ -117,6 +119,7 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
} }
} }
} }
}
$extension = strtolower(JFilterInput::getInstance()->clean($extension, 'cmd')); $extension = strtolower(JFilterInput::getInstance()->clean($extension, 'cmd'));
if ($type === 'component' && strpos($extension, 'com_') !== 0) if ($type === 'component' && strpos($extension, 'com_') !== 0)
{ {