Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed key sorting

  • Loading branch information...
commit 17652575f33a9b1494eb99de3b95a25bdf2e7e37 1 parent 5e896aa
Mike Gibson authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Routing/Route/CakeRoute.php
View
5 lib/Cake/Routing/Route/CakeRoute.php
@@ -520,8 +520,9 @@ protected function _writeUrl($params) {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.