Commit f0e2406
committed
minor #10831 [Serializer] XmlEncoder example fix (vertisan)
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] XmlEncoder example fix
Currently in example:
```
$encoder = new XmlEncoder();
$encoder->encode(array('foo' => array('@bar' => 'value'), 'qux' => array('#comment' => 'A comment));
```
we'll get `Parse error: syntax error, unexpected '', $serialized); ' (T_CONSTANT_ENCAPSED_STRING), expecting ')'`.
After close `A comment` string and add missing `$format`, it works correctly.
```
$encoder->encode(array('foo' => array('@bar' => 'value'), 'qux' => array('#comment' => 'A comment')), 'xml');
```
Commits
-------
9df531a XmlEncoder example fix1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
807 | | - | |
| 807 | + | |
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| |||
0 commit comments