mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 02:52:41 +00:00
Fixes #53, ordering of XML::toArray() operations.
This commit is contained in:
parent
5d3f0d7fe0
commit
0dfc07ba0d
2 changed files with 39 additions and 1 deletions
|
@ -691,6 +691,7 @@ class XmlNode extends Object {
|
|||
|
||||
foreach ($this->children as $child) {
|
||||
$key = $camelize ? Inflector::camelize($child->name) : $child->name;
|
||||
//debug($key);
|
||||
|
||||
if (is_a($child, 'XmlTextNode')) {
|
||||
$out['value'] = $child->value;
|
||||
|
@ -715,7 +716,7 @@ class XmlNode extends Object {
|
|||
if (isset($out[$key]) || isset($multi[$key])) {
|
||||
if (!isset($multi[$key])) {
|
||||
$multi[$key] = array($out[$key]);
|
||||
unset($out[$key]);
|
||||
//unset($out[$key]);
|
||||
}
|
||||
$multi[$key][] = $value;
|
||||
} elseif (!empty($value)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue