diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 14891d4eb..55a07ee77 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -355,9 +355,8 @@ class Router { break; } } - if (isset($defaults['prefix'])) { + if (isset($defaults['prefix']) && !in_array($defaults['prefix'], self::$_prefixes)) { self::$_prefixes[] = $defaults['prefix']; - self::$_prefixes = array_keys(array_flip(self::$_prefixes)); } $defaults += array('plugin' => null); if (empty($options['action'])) {