Skip to content
Permalink
Browse files

fixing null request returned by Router::getRequest()

fixes issues for Router::getRequest() called in a Plugin/Foo/routes.php
during bootstrap.
  • Loading branch information...
rchavik committed May 11, 2012
1 parent e5b3362 commit 335f3558a90e781283844c9efdb78001de77ce33
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Routing/Dispatcher.php
@@ -149,7 +149,6 @@ public function dispatch(CakeRequest $request, CakeResponse $response, $addition
return;
}
Router::setRequestInfo($request);
$controller = $this->_getController($request, $response);
if (!($controller instanceof Controller)) {
@@ -209,6 +208,7 @@ protected function _invoke(Controller $controller, CakeRequest $request, CakeRes
*/
public function parseParams($event) {
$request = $event->data['request'];
Router::setRequestInfo($request);
if (count(Router::$routes) == 0) {
$namedExpressions = Router::getNamedExpressions();
extract($namedExpressions);

0 comments on commit 335f355

Please sign in to comment.
You can’t perform that action at this time.