From 32b48ecc7cc8fcf17ccf0d3ceaf9285338336208 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 22 Oct 2011 18:48:31 -0400 Subject: [PATCH] Fix issue with missing base on redirect route. The request data wasn't set in Router when redirect routes are processed. This caused the base to become missing. This causes issues with applications running in a subdirectory. --- lib/Cake/Network/CakeRequest.php | 6 +++++- lib/Cake/Routing/Dispatcher.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 95915e5214c..7820b8cb299 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -34,7 +34,11 @@ class CakeRequest implements ArrayAccess { * * @var array */ - public $params = array(); + public $params = array( + 'plugin' => null, + 'controller' => null, + 'action' => null, + ); /** * Array of POST data. Will contain form data as well as uploaded files. diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 26fc2f3228f..f60ffefc9e6 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -75,8 +75,8 @@ public function dispatch(CakeRequest $request, CakeResponse $response, $addition return; } - $request = $this->parseParams($request, $additionalParams); Router::setRequestInfo($request); + $request = $this->parseParams($request, $additionalParams); $controller = $this->_getController($request, $response); if (!($controller instanceof Controller)) {