Permalink
Browse files

Fixing the parsing algorithm in XmlFileLoader.php so that it stops no…

…w and does not throw any mysterious exceptions.
  • Loading branch information...
1 parent 90b03f9 commit aa0999d9a3b29c7fd981e96f4e77444510276cb9 @zyxist zyxist committed Feb 10, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Opl/Collector/Configuration/XmlFileLoader.php
@@ -38,13 +38,13 @@ public function import()
$queue = new SplQueue;
$opts = array();
- $root = $this->_groupFactory($opts, $data->group, $queue);
+ $root = $this->_groupFactory($opts, $data, $queue);
while($queue->count() > 0)
{
list($localRoot, $pageDesc) = $queue->dequeue();
- $this->_groupFactory($localRoot, $data, $queue);
+ $this->_groupFactory($localRoot, $pageDesc, $queue);
}
return $opts;
@@ -70,6 +70,7 @@ protected function _groupFactory($root, $data, SplQueue $queue)
{
$queue->enqueue(array(&$root[$name], $subElement));
}
+ break;
default:
throw new RuntimeException('Cannot load an XML file: unknown element: \''.$xmlElement->getName().'\'');
}

0 comments on commit aa0999d

Please sign in to comment.