We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09f5669 + 92caea2 commit 2803cbdCopy full SHA for 2803cbd
.travis.yml
@@ -5,10 +5,6 @@ php:
5
- 7.1
6
- 7.2
7
8
-matrix:
9
- allow_failures:
10
- - php: 7.2
11
-
12
before_script:
13
- composer self-update
14
- composer install --no-interaction
src/Parsers/XmlParser.php
@@ -2,7 +2,6 @@
2
3
class XmlParser extends Parser
4
{
private $xml;
/**
@@ -23,7 +22,7 @@ private function objectify($value)
23
22
foreach ((array) $temp as $key => $value) {
24
if ($key === "@attributes") {
25
$result['_' . key($value)] = $value[key($value)];
26
- } elseif (count($value) < 1) {
+ } elseif (is_array($value) && count($value) < 1) {
27
$result[$key] = '';
28
} else {
29
$result[$key] = (is_array($value) or is_object($value)) ? $this->objectify($value) : $value;
0 commit comments