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.
1 parent 09f5669 commit ce1307fCopy full SHA for ce1307f
src/Parsers/XmlParser.php
@@ -2,7 +2,6 @@
2
3
class XmlParser extends Parser
4
{
5
-
6
private $xml;
7
8
/**
@@ -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