ZF-10369: Default action set too late in dispatch cycle

Issue Type: Bug Created: 2010-08-23T07:57:48.000+0000 Last Updated: 2012-11-20T21:37:43.000+0000 Status: Open Fix version(s): Reporter: Olek (olek) Assignee: None Tags: - Zend_Controller

  • Zend_Controller_Router

Related issues: Attachments:


Currently the default action ('index') is injected to the Request object only on Dispatch_Standard::dispatch() (method getActionMethod()), so naturally it's NULL before if the matched route doesn't specify it explicitly in its defaults.

It's NULL on all plugins' and helpers' init(), preDispatch() and similar methods (i.e. ContextSwitch::initContext()).

The solution would be to inject it on Router_Rewrite::route() method if a route match occures (probably method _setRequestParams() would be most appropriate).

If this suggested solution is regarded feasible for the community, I can provide a test-covered patch.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.