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

Remove usage of gipfl\Format\LocalTimeFormat in favor of direct use of intl also fixing bugs #2847

Closed
lippserd opened this issue Jan 11, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@lippserd
Copy link
Member

When using intl formatters, we may pass C as the locale which is not a valid ICU locale (note that this is not just gipfl specific). This was fine until a recent change in PHP, which now throws an exception in PHP >= 8.1.25. Since patching gipfl is not an option, we will simply replace it with using intl directly. Note that it is important not to use setlocale(..., 0) to pass the locale to intl, as this could pass C, which is invalid. I suggest just using null as this will automatically retrieve the default/set ICU locale, or Locale::getDefault() which does the same.

It also makes sense to replace strtotime() calls with new DateTime() where the code will change.

Upon creating a PR, make sure to also reference (resolve) the following issues:

@lippserd lippserd added this to the v1.11.1 milestone Jan 11, 2024
@lippserd lippserd added the bug label Jan 11, 2024
nilmerg pushed a commit that referenced this issue Feb 8, 2024
@nilmerg nilmerg closed this as completed Feb 8, 2024
Donien pushed a commit to Donien/icingaweb2-module-director that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants