Fixed key sorting

This commit is contained in:
Mike Gibson 2014-03-10 13:09:19 +00:00
parent 5e896aa94a
commit 17652575f3

View file

@ -520,8 +520,9 @@ class CakeRoute {
$search = $replace = array();
$lengths = array_map('strlen', $this->keys);
$keys = array_combine($lengths, $this->keys);
krsort($keys);
$flipped = array_combine($this->keys, $lengths);
arsort($flipped);
$keys = array_flip($flipped);
foreach ($keys as $key) {
$string = null;