diff --git a/src/XMLParser.php b/src/XMLParser.php index ac49f75..e28bc23 100644 --- a/src/XMLParser.php +++ b/src/XMLParser.php @@ -142,7 +142,7 @@ private static function &convert($node_name, $arr = []) // after we are done with all the keys in the array (if it is one) // we check if it has any text value, if yes, append it. - if (!is_array($arr)) { + if (!is_array($arr) && !is_object($arr)) { $node->appendChild($xml->createTextNode(htmlspecialchars(self::bool2str($arr), ENT_QUOTES, self::$encoding))); }