From 2aff5f37b2c0b5b019b0f644a7ebd816cb6d5cc6 Mon Sep 17 00:00:00 2001 From: Andrei Sandulescu Date: Wed, 9 Nov 2016 11:39:12 +0200 Subject: [PATCH] - avoid fatal error if the content looks like 'You are being redirected.' --- LSS/XML2Array.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LSS/XML2Array.php b/LSS/XML2Array.php index cc03efe..31ce04b 100644 --- a/LSS/XML2Array.php +++ b/LSS/XML2Array.php @@ -110,6 +110,10 @@ protected static function &convert($node) { if(isset($child->tagName)) { $t = $child->tagName; + // avoid fatal error if the content looks like 'You are being redirected.' + if(isset($output) && !is_array($output)) { + continue; + } // assume more nodes of same kind are coming if(!isset($output[$t])) { $output[$t] = array();