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

Commit

Permalink
Merge pull request #46 from bjornmann/patch-1
Browse files Browse the repository at this point in the history
Add check for is_object in addition to is_array in XMLParser.php
  • Loading branch information
VinceG authored Feb 19, 2019
2 parents e3f73cd + fa9e21a commit 26c4f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XMLParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}

Expand Down

0 comments on commit 26c4f17

Please sign in to comment.