Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[12.x] fix: continue route matching rather than returning second fallbackRoute#57922

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
taylorotwell merged 1 commit intolaravel:12.xfromryzr:patch-30
Nov 26, 2025

Conversation

@ryzr
Copy link
Contributor

@ryzrryzr commentedNov 26, 2025
edited
Loading

PR#57871 introduced a very slight change to the behaviour of matching fallback routes.

Before#57871: Return first non-fallback route match, otherwise return first fallback route match.

After#57871: Return the second matching fallback route (if one exist), otherwise return the first non-fallback route match, otherwise return the first fallback route.

Reasoning:
After the first fallbackRoute is matched, the next fallbackRoute will no longer get caught by the ->isFallback guard, due to the === null check. This causes the next matching fallbackRoute to be returned, rather than continuing through the non-fallback routes.

To fix this, I've removed the === null check, causing the loop to continue. I used null coalescing assignment to ensure only the first fallback route is captured.

cosmastech, pemba17, tasmanboat, and mnaderian reacted with thumbs up emoji
@ryzrryzr changed the title[12.x] fix: don't return second fallback route if another route matches[12.x] fix: continue route matching rather than returning second fallbackRouteNov 26, 2025
@bytestream
Copy link
Contributor

Noticed this too and this fixes it 👍🏼 . Think a test would be useful to prevent future regression.

@taylorotwelltaylorotwell merged commitb249385 intolaravel:12.xNov 26, 2025
76 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ryzr@bytestream@taylorotwell

[8]ページ先頭

©2009-2025 Movatter.jp