Skip to content

Commit 813dbaa

Browse files
author
viacheslav diomidov
committed
BUGFIX EXTREST-137 simpleXml fix for & in values
1 parent c3328f4 commit 813dbaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Api/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml)
325325

326326
foreach ($parts as $part) {
327327
@list($name, $value) = explode('=', $part);
328-
if($part !== $lastParts) {
328+
if ($part !== $lastParts) {
329329
$node = $node->addChild($name);
330330
} else {
331-
$node->{$name} = (string)$value;
331+
$node->{$name} = (string) $value;
332332
}
333333
}
334334

@@ -351,7 +351,7 @@ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl =
351351
if (is_array($value)) {
352352
$this->_arrayToXml($value, $this->_isAssocArray($value) ? $xml->addChild($el) : $xml, $el);
353353
} else {
354-
$xml->{$el} = (string)$value;
354+
$xml->{$el} = (string) $value;
355355
}
356356
}
357357

0 commit comments

Comments
 (0)