Skip to content

Commit

Permalink
BUGFIX EXTREST-143 Extend already set properties instead of overwriti…
Browse files Browse the repository at this point in the history
…ng them
  • Loading branch information
Alexandr Bashurov committed Mar 29, 2022
1 parent f563d54 commit 796ea2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 796ea2c

Please sign in to comment.