Skip to content

Commit 8dfb847

Browse files
Murielfabpot
authored andcommitted
Fix warning for buildXml method
Fix "Warning: Missing argument 3" for XmlEncoder::buildXml() called several times in XmlEncoder::selectNodeType()
1 parent cec45a9 commit 8dfb847

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Encoder/XmlEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private function parseXml($node)
287287
*
288288
* @throws UnexpectedValueException
289289
*/
290-
private function buildXml($parentNode, $data, $xmlRootNodeName)
290+
private function buildXml($parentNode, $data, $xmlRootNodeName = null)
291291
{
292292
$append = true;
293293

@@ -392,7 +392,7 @@ private function needsCdataWrapping($val)
392392
private function selectNodeType($node, $val)
393393
{
394394
if (is_array($val)) {
395-
return $this->buildXml($node, $val, null);
395+
return $this->buildXml($node, $val);
396396
} elseif ($val instanceof \SimpleXMLElement) {
397397
$child = $this->dom->importNode(dom_import_simplexml($val), true);
398398
$node->appendChild($child);

0 commit comments

Comments
 (0)