mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed key sorting
This commit is contained in:
parent
5e896aa94a
commit
17652575f3
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue