diff --git a/src/Api/Client.php b/src/Api/Client.php index 80e83be6..fb2e4a94 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -349,8 +349,10 @@ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = $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; } }