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 lang() function overriding default locale in Language class #5001

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

pjsde
Copy link
Contributor

@pjsde pjsde commented Aug 14, 2021

After using the lang() function with the $locale parameter filled in, it overrides the default locale in the Language class, which shouldn't happen, because when using the lang() function with the $locale parameter it should be just for that call.

With this change, this override is corrected and the locale that was previously selected is restored.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for changing that. There are a few style issues but this whole branch needs to be run through CS Fixer once it is ready so not a big deal - just mind it for the future.

@MGatner MGatner merged commit 32e0afd into codeigniter4:4.2 Aug 17, 2021
@pjsde pjsde deleted the fix_lang_function branch June 16, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants