-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: format_number() can't be used on CLI #6263
fix: format_number() can't be used on CLI #6263
Conversation
We are using Locale::getDefault().
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.
One small typo but otherwise looks good 👍
locale_set_default($this->config->defaultLocale ?? 'en'); | ||
Locale::setDefault($this->config->defaultLocale ?? 'en'); |
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.
I'm curious why you changed this. Isn't they the same?
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.
Now we are using Locale::getDefault()
and I searched Locale::setDefault()
but not found.
Using locale_set_default()
and Locale::getDefault()
is not consistent.
Co-authored-by: MGatner <mgatner@icloud.com>
Thank you @kenjis |
Description
format_number()
depends onIncommingRequest::getLocale()
, and causes ErrorCall to undefined method CodeIgniter\HTTP\CLIRequest::getLocale()
.Checklist: