From 3c9cb3b97d2a854f7f2a895d5a630128da48ed83 Mon Sep 17 00:00:00 2001 From: evilbloodydemon Date: Fri, 22 Apr 2011 23:52:42 +0400 Subject: [PATCH] Unused variables in Routing removed --- lib/Cake/Routing/Dispatcher.php | 1 - lib/Cake/Routing/Route/CakeRoute.php | 2 +- lib/Cake/Routing/Router.php | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index be0ebe77e..a5d0c10a5 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -299,7 +299,6 @@ class Dispatcher { include WWW_ROOT . DS . $filters['js']; return true; } - $controller = null; $pathSegments = explode('.', $url); $ext = array_pop($pathSegments); $parts = explode('/', $url); diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index c40c84e18..0c66a15bc 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -399,7 +399,7 @@ class CakeRoute { $greedyNamed = $namedConfig['greedyNamed']; $allowedNamedParams = $namedConfig['rules']; - $named = $pass = $_query = array(); + $named = $pass = array(); foreach ($url as $key => $value) { diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index fd60e2b8e..3f63fd7bb 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -487,7 +487,7 @@ class Router { 'named' => array() ); - $r = $ext = null; + $ext = null; if ($url && strpos($url, '/') !== 0) { $url = '/' . $url; @@ -771,7 +771,7 @@ class Router { * @return string Full translated URL with base path. */ public static function url($url = null, $full = false) { - $defaults = $params = array('plugin' => null, 'controller' => null, 'action' => 'index'); + $params = array('plugin' => null, 'controller' => null, 'action' => 'index'); if (is_bool($full)) { $escape = false; @@ -792,7 +792,7 @@ class Router { } $base = $path['base']; - $extension = $output = $mapped = $q = $frag = null; + $extension = $output = $q = $frag = null; if (empty($url)) { $output = isset($path['here']) ? $path['here'] : '/';