Index: Xml.php =================================================================== --- Xml.php (revision 6744) +++ Xml.php (working copy) @@ -125,13 +125,18 @@ protected function _toArray($xmlObject) { $config = array(); - foreach ($xmlObject->children() as $key => $value) { - if ($value->children()) { - $config[$key] = $this->_toArray($value); - } else { - $config[$key] = (string) $value; - } + if ($xmlObject->children()) { + foreach ($xmlObject->children() as $key => $value) { + if ($value->children()) { + $config[$key] = $this->_toArray($value); + } else { + $config[$key] = (string) $value; + } + } + } else { + $config = (string) $xmlObject; } + return $config; }