Replaced item
with *item
when parsing XML string
This commit is contained in:
parent
a7f7be2309
commit
a0561e5dde
@ -159,6 +159,10 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||
* after login, the user is now redirected to `default_target_path` if `use_referer` is true and the referrer is the `login_path`.
|
||||
* added a way to remove a token from a session
|
||||
|
||||
### Serializer
|
||||
|
||||
* [BC BREAK] replaced the `item` XML tag with `*item`
|
||||
|
||||
### Translation
|
||||
|
||||
* added support for gettext
|
||||
|
@ -188,12 +188,12 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
||||
$value = (string) $subnode;
|
||||
}
|
||||
|
||||
if ($key === 'item') {
|
||||
if ($key === '*item') {
|
||||
if (isset($value['@key'])) {
|
||||
$data[(string) $value['@key']] = $value['#'];
|
||||
} elseif (isset($data['item'])) {
|
||||
$tmp = $data['item'];
|
||||
unset($data['item']);
|
||||
} elseif (isset($data['*item'])) {
|
||||
$tmp = $data['*item'];
|
||||
unset($data['*item']);
|
||||
$data[] = $tmp;
|
||||
$data[] = $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user