Skip to content


Handle return of config object from $this->config['helper_map'] in ViewManager #1333

wants to merge 1 commit into from

3 participants


There was a warning when config object, rather than array was returned.


Probably not needed if 46fd68b is merged.

Zend Framework member

Better to test for Traversable. I didn't spot this PR until I'd created #1333. Though, as noted, both are moot if PR 1331 is merged.

@akrabat akrabat closed this

Hey @akrabat, your solution is much better. Thanks. (That's one thing I enjoy about contributing to OS projects, my coding style keeps getting sharpened.)

Zend Framework member

Just for the sake of record keeping, PR 1331 has been merged to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 22, 2012
  1. @superdweebie
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0 library/Zend/Mvc/View/ViewManager.php
3 library/Zend/Mvc/View/ViewManager.php
@@ -178,6 +178,9 @@ public function getHelperLoader()
$map = array();
if (isset($this->config['helper_map'])) {
$map = $this->config['helper_map'];
+ if(!is_array($map)){
+ $map = $map->toArray();
+ }
if (!in_array('Zend\Form\View\HelperLoader', $map)) {
array_unshift($map, 'Zend\Form\View\HelperLoader');
Something went wrong with that request. Please try again.