Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9544405

Browse files
committed
merged branch fabpot/moved_serializer_4 (PR #7292)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7292). Commits ------- 4ffe234 Fix warning for buildXml method Discussion ---------- Fix missing argument This PR was submitted on the symfony/Serializer read-only repository and moved automatically to the main Symfony repository (closes symfony/serializer#4). Fix "Warning: Missing argument 3" for XmlEncoder::buildXml() called several times in XmlEncoder::selectNodeType()
2 parents 3263fe1 + 523ef29 commit 9544405

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Serializer/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)