diff --git a/.travis.yml b/.travis.yml index 2c5f8b6..d5d034b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,6 @@ php: - 7.1 - 7.2 -matrix: - allow_failures: - - php: 7.2 - before_script: - composer self-update - composer install --no-interaction diff --git a/src/Parsers/XmlParser.php b/src/Parsers/XmlParser.php index 973d555..6f29104 100644 --- a/src/Parsers/XmlParser.php +++ b/src/Parsers/XmlParser.php @@ -2,7 +2,6 @@ class XmlParser extends Parser { - private $xml; /** @@ -23,7 +22,7 @@ private function objectify($value) foreach ((array) $temp as $key => $value) { if ($key === "@attributes") { $result['_' . key($value)] = $value[key($value)]; - } elseif (count($value) < 1) { + } elseif (is_array($value) && count($value) < 1) { $result[$key] = ''; } else { $result[$key] = (is_array($value) or is_object($value)) ? $this->objectify($value) : $value;