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


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