Skip to content

Commit 06bc487

Browse files
committed
minor #10834 Fixed the code of an XmlEncoder example (javiereguiluz)
This PR was merged into the 4.1 branch. Discussion ---------- Fixed the code of an XmlEncoder example Similar to #10831 but for 4.1 branch. Commits ------- 56114b9 Fixed the code of an XmlEncoder example
2 parents 018f5a4 + 56114b9 commit 06bc487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ The ``XmlEncoder`` will encode this object like that::
714714
Be aware that this encoder will consider keys beginning with ``@`` as attributes::
715715

716716
$encoder = new XmlEncoder();
717-
$encoder->encode(array('foo' => array('@bar' => 'value')));
717+
$encoder->encode(array('foo' => array('@bar' => 'value')), 'xml');
718718
// will return:
719719
// <?xml version="1.0"?>
720720
// <response>

0 commit comments

Comments
 (0)