From deea24b153b75fedc84751968e1655fd78834464 Mon Sep 17 00:00:00 2001 From: nate Date: Fri, 15 Dec 2006 16:10:57 +0000 Subject: [PATCH] Fixing undefined index error in Router git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4104 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/router.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cake/libs/router.php b/cake/libs/router.php index 70de326b8..2eea80d50 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -300,12 +300,10 @@ class Router extends Overloadable { * @return void */ function setParams($params) { - $_this =& Router::getInstance(); - $params[1] = am( - array('plugin' => null, 'controller' => null, 'action' => null), - $params[1] - ); + $defaults = array('plugin' => null, 'controller' => null, 'action' => null); + $params[0] = am($defaults, $params[0]); + $params[1] = am($defaults, $params[1]); list($_this->__params[], $_this->__paths[]) = $params; } /**