diff --git a/api_util.php b/api_util.php index 5441fb8..8552256 100755 --- a/api_util.php +++ b/api_util.php @@ -146,8 +146,9 @@ public static function phpToXml($key, $values) { $firstKey = array_shift($valuekeys); if (is_array($value[$firstKey]) || count($value) > 0 ) { $_xml = self::phpToXml($node,$value) ; - } - else { + } elseif (count($value) == 0) { + $_xml .= "<$node>"; + } else { $_xml = self::phpToXml($node,$value) ; $v = $value[$firstKey]; $_xml .= "<$node>" . htmlspecialchars($v) . "";