Skip to content

Commit 2803cbd

Browse files
authored
Merge pull request #42 from SoapBox/bugfix/php-72
[Bugfix] PHP 7.2 Support
2 parents 09f5669 + 92caea2 commit 2803cbd

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ php:
55
- 7.1
66
- 7.2
77

8-
matrix:
9-
allow_failures:
10-
- php: 7.2
11-
128
before_script:
139
- composer self-update
1410
- composer install --no-interaction

src/Parsers/XmlParser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
class XmlParser extends Parser
44
{
5-
65
private $xml;
76

87
/**
@@ -23,7 +22,7 @@ private function objectify($value)
2322
foreach ((array) $temp as $key => $value) {
2423
if ($key === "@attributes") {
2524
$result['_' . key($value)] = $value[key($value)];
26-
} elseif (count($value) < 1) {
25+
} elseif (is_array($value) && count($value) < 1) {
2726
$result[$key] = '';
2827
} else {
2928
$result[$key] = (is_array($value) or is_object($value)) ? $this->objectify($value) : $value;

0 commit comments

Comments
 (0)