Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Fatal error: 'continue' not in the 'loop' or 'switch' context in /zend-view/src/Helper/Navigation/PluginManager.php on line 62 #19

Closed
samsonasik opened this issue Feb 18, 2016 · 10 comments
Labels

Comments

@samsonasik
Copy link
Contributor

It's originally I commented at zendframework/zend-view#45. I use latest zf2 :

"zendframework/zendframework": "^2.5"

The stacktrace is:

Fatal error: 'continue' not in the 'loop' or 'switch' context in /Users/samsonasik/www/MyProject/vendor/zendframework/zend-view/src/Helper/Navigation/PluginManager.php on line 62
Call Stack
#   Time    Memory  Function    Location
1   0.0002  368728  {main}( )   .../index.php:0
2   0.0843  4939896 Zend\Mvc\Application->run( )    .../index.php:21
3   0.0945  5351360 Zend\Mvc\Application->completeRequest( )    .../Application.php:328
4   0.0945  5351360 Zend\EventManager\EventManager->trigger( )  .../Application.php:353
5   0.0945  5351416 Zend\EventManager\EventManager->triggerListeners( ) .../EventManager.php:214
6   0.0947  5353104 call_user_func:{/Users/samsonasik/www/MyProject/vendor/zendframework/zend-eventmanager/src/EventManager.php:490} ( )    .../EventManager.php:490
7   0.0947  5353104 Zend\Mvc\View\Http\DefaultRenderingStrategy->render( )  .../EventManager.php:490
8   0.0947  5353104 Zend\View\View->render( )   .../DefaultRenderingStrategy.php:103
9   0.1215  5373872 Zend\View\Renderer\PhpRenderer->render( )   .../View.php:207
10  0.1217  5411144 include( '/Users/samsonasik/www/MyProject/module/Application/view/layout/layout.phtml' )    .../PhpRenderer.php:502
11  0.1331  5936048 Zend\View\Helper\Navigation->menu( )    .../layout.phtml:55
12  0.1331  5936104 Zend\View\Helper\Navigation->__call( )  .../layout.phtml:55
13  0.1331  5936104 Zend\View\Helper\Navigation->findHelper( )  .../Navigation.php:112
14  0.1331  5936104 Zend\View\Helper\Navigation->getPluginManager( )    .../Navigation.php:151
15  0.1331  5936104 spl_autoload_call ( )   .../Navigation.php:325
16  0.1331  5936264 Composer\Autoload\ClassLoader->loadClass( ) .../Navigation.php:325
17  0.1331  5936424 Composer\Autoload\includeFile( )    .../ClassLoader.php:301
@froschdesign
Copy link
Member

Line 62

@michalbundyra
Copy link
Member

It is bug in zendframework/zend-view not zendframework/zend-navigation !

@samsonasik
Copy link
Contributor Author

@weierophinney said that it should be reported here zendframework/zend-view#45 (comment)

@froschdesign
Copy link
Member

@webimpress
It is the correct repository / issue tracker, because Zend\View\Helper\Navigation is part of Zend\Navigation.

@weierophinney
Copy link
Member

@webimpress It's not a bug in zend-view. It's a problem of zend-navigation extending zend-view's HelperPluginManager, which changed the signature of the constructor to make it forwards-compatible with zend-servicemanager v3. We'll be updating zend-navigation shortly, which will eliminate the issue.

Also: @froschdesign has found a definite flaw in that line, which demonstrates it's a problem in this repository!

@tmcnicholls
Copy link

But @froschdesign links to a file contained in the zend-view repository? For sure this PluginManager.php is downloaded via composer as part of zend-view

https://github.com/zendframework/zend-view/blob/master/src/Helper/Navigation/PluginManager.php#L62

@weierophinney
Copy link
Member

@tmcnicholls — d'oh! You're right! I'll get an update out for that ASAP; thanks! (I was seeing "Navigation" in the namespace, and missed the Zend\View bit of it entirely; the problems of getting up too early!)

@tmcnicholls
Copy link

@weierophinney No problem, thanks!

@michalbundyra
Copy link
Member

@tmcnicholls , @weierophinney thanks

@weierophinney
Copy link
Member

Fixed in zendframework/zend-view#47.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants