-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.5] revert PR #21214 #21255
[5.5] revert PR #21214 #21255
Conversation
OK, will take a look and address. |
I've identified a fix that works correctly with all sort options; I'll do some thorough testing to be certain, and resubmit this evening. |
@@ -1348,7 +1348,7 @@ public function sortBy($callback, $options = SORT_REGULAR, $descending = false) | |||
// function which we were given. Then, we will sort the returned values and | |||
// and grab the corresponding values for the sorted keys from this array. | |||
foreach ($this->items as $key => $value) { | |||
$results[$key] = [$callback($value, $key), $key]; | |||
$results[$key] = $callback($value, $key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting this line fixes the route issues for me.
I think the root cause of route-related issues on 5.5.5 to 5.5.7 is actually b1e01e7, as part of the added support for fallback routes (#21234). The @themsaid's PR #21261 fixes that, and should resolve #21257 and #21258 once it's tagged. This unstable sorting was temporarily fixed on version 5.5.5 by #21214, which made |
As reported in #21253, this PR broke when any of the following options is used: