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

Fatal error when using the default PHP locale #17

Closed
jonasraoni opened this issue Jan 25, 2024 · 1 comment
Closed

Fatal error when using the default PHP locale #17

jonasraoni opened this issue Jan 25, 2024 · 1 comment

Comments

@jonasraoni
Copy link

The code (new IntlDateFormatter('C'))->format(new DateTime()) generates a fatal error on the latest PHP 8.x releases, see a reproduction case here and the exception below:

PHP Fatal error: Uncaught Error: Found unconstructed IntlDateFormatter in /var/www/html/vendor/php81_bc/strftime/src/php-8.1-strftime.php:100

@jonasraoni
Copy link
Author

Thanks! As an extra note, this has been fixed in PHP 8.2.15 (see: php/php-src#12943).

splitbrain added a commit to splitbrain/strftime that referenced this issue Jan 26, 2024
* master:
  Tests: use assertThat instead assertMatchesRegularExpression
  Fix tests: PHP-7.4 on Windows
  Fix tests: PHP-7.4 on Windows
  Fix tests
  Fix test
  Action: add Windows and macOS test
  Fix test locale eu
  Fix test with PHP-8.3
  Actions: update checkout and cache
  Test only on ubuntu-latest
  Test on matrix
  Fix fatal error when using the default PHP locale alphp#17
  Code review tweaks
  alphp#15 Fix fatal error with non-Gregorian locales
splitbrain added a commit to splitbrain/strftime that referenced this issue Jan 26, 2024
* master:
  Tests: use assertThat instead assertMatchesRegularExpression
  Fix tests: PHP-7.4 on Windows
  Fix tests: PHP-7.4 on Windows
  Fix tests
  Fix test
  Action: add Windows and macOS test
  Fix test locale eu
  Fix test with PHP-8.3
  Actions: update checkout and cache
  Test only on ubuntu-latest
  Test on matrix
  Fix fatal error when using the default PHP locale alphp#17
  Code review tweaks
  alphp#15 Fix fatal error with non-Gregorian locales
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

No branches or pull requests

2 participants