MDL-84983 core: account for invalid locales in intl extension.

Recent PHP versions are now stricter on the `$locale` value passed
to `IntlDateFormatter` class and will throw exceptions for invalid
values (some of which may be present in our language packs).

See: https://github.com/php/php-src/issues/12912
This commit is contained in:
Paul Holden
2025-04-28 10:56:21 +07:00
committed by Huong Nguyen
parent 89285b7efc
commit 2e90ab1ee8
2 changed files with 17 additions and 1 deletions
+6
View File
@@ -787,6 +787,12 @@ final class date_test extends advanced_testcase {
"%e %b %Y",
" 9 окт. 2024",
],
'Invalid locale' => [
1728487000,
'xx',
'%B %Y',
'October 2024',
],
];
}