Description
Description
Since PHP 8.1.25 and due to the changes in #12282, the following code throws an IntlException
:
<?php
new IntlDateFormatter(
'xx',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
null,
null,
'w'
);
There may be many reasons why the locale
value is invalid β it might be taken from the LANG
environment variable and be set to C
, it might be parsed from request parameters (the reason behind #12533), or it might be a locale name that is valid on one system but is not in the list of generated/supported locales on another system.
While I agree that ideally, all these conditions should be checked and caught beforehand, and I also agree that fixing #12282 without a sensible locale to assume might be difficult, my point is that turning this condition into an exception in a bugfix release is a breaking change that should be reverted.
PHP Version
PHP 8.1.25
Operating System
No response