Skip to content
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

Fix: Route placeholder (:any) with {locale} #6003

Merged

Conversation

iRedds
Copy link
Collaborator

@iRedds iRedds commented May 18, 2022

Description
Fixes #5997

The locale was determined incorrectly if the placeholder (:any) was specified in the route.

Search for {locale} by splitting path segments into an array has been replaced with a search through a regular expression using a named group.

Checklist:

  • Securely signed commits
  • Unit testing, with >80% coverage
  • Conforms to style guide

Signed-off-by: Andrey Pyzhikov <5071@mail.ru>
@iRedds iRedds changed the title Fix: Route placeholder {locale} Fix: Route placeholder (:any) with {locale} May 18, 2022
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label May 18, 2022
@samsonasik samsonasik merged commit 8a8c183 into codeigniter4:develop May 19, 2022
@samsonasik
Copy link
Member

Thank you @iRedds

@iRedds iRedds deleted the fix/detect-locale-placeholder branch May 19, 2022 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Using placeholder (:any) before {locale} in routes cause incorrect $localeSegment value.
4 participants