Skip to content
Features
Business
Explore
Marketplace
Pricing
This repository
Sign in
or
Sign up
Watch
673
Star
7,520
Fork
3,326
cakephp
/
cakephp
Code
Issues
198
Pull requests
30
Projects
0
Wiki
Insights
Permalink
Browse files
Fixed key sorting
Loading branch information
...
Mike Gibson
committed
Mar 10, 2014
1 parent
5e896aa
commit
17652575f33a9b1494eb99de3b95a25bdf2e7e37
Unified
Split
Showing
1 changed file
with
3 additions
and
2 deletions
.
+3
−2
lib/Cake/Routing/Route/CakeRoute.php
Show comments
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
;
Toggle all file notes
0 comments on commit
1765257
Please
sign in
to comment.
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
Press h to open a hovercard with more details.
0 comments on commit
1765257