Skip to content
This repository
Browse code

fixing null request returned by Router::getRequest()

fixes issues for Router::getRequest() called in a Plugin/Foo/routes.php
during bootstrap.
  • Loading branch information...
commit 335f3558a90e781283844c9efdb78001de77ce33 1 parent e5b3362
Rachman Chavik authored May 11, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/Cake/Routing/Dispatcher.php
2  lib/Cake/Routing/Dispatcher.php
@@ -149,7 +149,6 @@ public function dispatch(CakeRequest $request, CakeResponse $response, $addition
149 149
 			return;
150 150
 		}
151 151
 
152  
-		Router::setRequestInfo($request);
153 152
 		$controller = $this->_getController($request, $response);
154 153
 
155 154
 		if (!($controller instanceof Controller)) {
@@ -209,6 +208,7 @@ protected function _invoke(Controller $controller, CakeRequest $request, CakeRes
209 208
  */
210 209
 	public function parseParams($event) {
211 210
 		$request = $event->data['request'];
  211
+		Router::setRequestInfo($request);
212 212
 		if (count(Router::$routes) == 0) {
213 213
 			$namedExpressions = Router::getNamedExpressions();
214 214
 			extract($namedExpressions);

0 notes on commit 335f355

Please sign in to comment.
Something went wrong with that request. Please try again.