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 28, 2022
1 parent 4bef1cd commit 0120437
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 @@ -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;
}
}

Expand Down

0 comments on commit 0120437

Please sign in to comment.