Merge pull request #535 from michaelhagedon/2.1

Fixing _fromArray()
This commit is contained in:
Mark Story 2012-02-29 08:32:45 -08:00
commit 9d017c2b5c

View file

@ -232,9 +232,9 @@ class Xml {
}
if (array_keys($value) === range(0, count($value) - 1)) { // List
foreach ($value as $item) {
$data = compact('dom', 'node', 'key', 'format');
$data['value'] = $item;
self::_createChild($data);
$itemData = compact('dom', 'node', 'key', 'format');
$itemData['value'] = $item;
self::_createChild($itemData);
}
} else { // Struct
self::_createChild(compact('dom', 'node', 'key', 'value', 'format'));