From a7d07aea20968462cdba94244a5cbd678f0f9bc1 Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 7 Dec 2006 22:41:20 +0000 Subject: [PATCH] Fixing undefined index notice with admin routes git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4081 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/router.php b/cake/libs/router.php index 51ee00d14..70de326b8 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -396,7 +396,7 @@ class Router extends Overloadable { } if (defined('CAKE_ADMIN') && !isset($url[CAKE_ADMIN]) && isset($params[CAKE_ADMIN])) { $url[CAKE_ADMIN] = $params[CAKE_ADMIN]; - } elseif (defined('CAKE_ADMIN') && $url[CAKE_ADMIN] == false) { + } elseif (defined('CAKE_ADMIN') && isset($url[CAKE_ADMIN]) && $url[CAKE_ADMIN] == false) { unset($url[CAKE_ADMIN]); } @@ -473,7 +473,7 @@ class Router extends Overloadable { $output = $base . $url; } else { $output = $base . '/'; - if (defined('CAKE_ADMIN')) { + if (defined('CAKE_ADMIN') && isset($params[CAKE_ADMIN])) { $output .= CAKE_ADMIN . '/'; } $output .= strtolower($params['controller']) . '/' . $url;