mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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
This commit is contained in:
parent
7fd83394ca
commit
a7d07aea20
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue