diff --git a/src/Api/Client.php b/src/Api/Client.php index f622028f..74d274c7 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -361,8 +361,10 @@ private function arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = nul $el = is_int($key) && $parentEl ? $parentEl : $key; if (is_array($value)) { $this->arrayToXml($value, $this->isAssocArray($value) ? $xml->addChild($el) : $xml, $el); - } else { + } elseif(!isset($xml->{$el})) { $xml->{$el} = (string) $value; + } else { + $xml->{$el}[] = (string) $value; } }