mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 19:12:42 +00:00
Fixes #53, ordering of XML::toArray() operations.
This commit is contained in:
parent
9f5949ab52
commit
ec3f4b8d34
2 changed files with 39 additions and 1 deletions
|
@ -664,6 +664,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;
|
||||
|
@ -688,7 +689,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