diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index e06c6d228e7..3babe7c580d 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -1053,7 +1053,7 @@ public static function reverse($params, $full = false) { * @param array|string $url URL to normalize Either an array or a string URL. * @return string Normalized URL */ - public static function normalize($url = '/', $strip = true) { + public static function normalize($url = '/') { if (is_array($url)) { $url = Router::url($url); } @@ -1062,7 +1062,7 @@ public static function normalize($url = '/', $strip = true) { } $request = Router::getRequest(); - if ($strip && !empty($request->base) && stristr($url, $request->base)) { + if (!empty($request->base) && stristr($url, $request->base)) { $url = preg_replace('/^' . preg_quote($request->base, '/') . '/', '', $url, 1); } $url = '/' . $url; diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index bb7038646cc..44c256bd752 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -284,9 +284,6 @@ public function testUrlNormalization() { $result = Router::normalize('/us/users/logout/'); $this->assertEquals('/users/logout', $result); - $result = Router::normalize('/us/users/logout/', false); - $this->assertEquals('/us/users/logout', $result); - Router::reload(); $request = new CakeRequest();