From 5fafb747f0b7ed00c12cc9db93c7067a319e2178 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Wed, 24 Feb 2021 00:06:02 +0300 Subject: [PATCH] fix loop through children nodes --- .../com_jedchecker/libraries/rules/xmlinfo.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php b/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php index 836aed1..5fea42c 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php +++ b/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php @@ -109,11 +109,14 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule else { $extension = (string) $xml->name; - foreach ($xml->files->children as $child) + if (isset($xml->files)) { - if (isset($child[$type])) + foreach ($xml->files->children() as $child) { - $extension = (string) $child[$type]; + if (isset($child[$type])) + { + $extension = (string) $child[$type]; + } } } }