Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit 26c4f17

Browse files
authored
Merge pull request #46 from bjornmann/patch-1
Add check for is_object in addition to is_array in XMLParser.php
2 parents e3f73cd + fa9e21a commit 26c4f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/XMLParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private static function &convert($node_name, $arr = [])
142142

143143
// after we are done with all the keys in the array (if it is one)
144144
// we check if it has any text value, if yes, append it.
145-
if (!is_array($arr)) {
145+
if (!is_array($arr) && !is_object($arr)) {
146146
$node->appendChild($xml->createTextNode(htmlspecialchars(self::bool2str($arr), ENT_QUOTES, self::$encoding)));
147147
}
148148

0 commit comments

Comments
 (0)