From fa9e21a24634c9062871edd794676d9261c40c9a Mon Sep 17 00:00:00 2001 From: Bjorn Mann Date: Tue, 19 Feb 2019 11:02:42 -0500 Subject: [PATCH] Add check for is_object in addition to is_array This is to avoid the warning --- src/XMLParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))); }