ZF-9815: Zend_Navigation_Container::addPages() should accept a Zend_Navigation_Container
Description
The addPages() method of Zend_Navigation_Container only takes an array or a Zend_Config instance. It should also accept a Zend_Navigation_Container.
It's a fairly minor fix. Insert the following into the addPages method:
if ($pages instanceof Zend_Navigation_Container) {
$pages = iterator_to_array($pages);
}
The docblocks and exception message will also need updating. Note: this uses iterator_to_array instead of getPages so that the order of pages will be consistent with calling toArray().
Comments
Posted by Frank Brückner (frosch) on 2011-09-05T16:47:20.000+0000
Patch and unit test added.
Posted by Pádraic Brady (padraic) on 2011-09-11T18:34:10.000+0000
Fixed in r24458