mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.1' into PHP-8.2
This commit is contained in:
commit
a39e869b55
3 changed files with 13 additions and 9 deletions
4
NEWS
4
NEWS
|
@ -24,6 +24,10 @@ PHP NEWS
|
|||
. Fixed bug GH-12232 (FPM: segfault dynamically loading extension without
|
||||
opcache). (Jakub Zelenka)
|
||||
|
||||
- Intl:
|
||||
. Removed the BC break on IntlDateFormatter::construct which threw an
|
||||
exception with an invalid locale. (David Carlier)
|
||||
|
||||
- Opcache:
|
||||
. Added warning when JIT cannot be enabled. (danog)
|
||||
. Fixed bug GH-8143 (Crashes in zend_accel_inheritance_cache_find since
|
||||
|
|
|
@ -113,8 +113,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_error_handlin
|
|||
locale = Locale::createFromName(locale_str);
|
||||
/* get*Name accessors being set does not preclude being bogus */
|
||||
if (locale.isBogus() || strlen(locale.getISO3Language()) == 0) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: invalid locale", 0);
|
||||
return FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* process calendar */
|
||||
|
|
|
@ -5,17 +5,18 @@ intl
|
|||
--FILE--
|
||||
<?php
|
||||
|
||||
try {
|
||||
new IntlDateFormatter(
|
||||
var_dump(new IntlDateFormatter(
|
||||
'xx',
|
||||
IntlDateFormatter::FULL,
|
||||
IntlDateFormatter::FULL,
|
||||
null,
|
||||
null,
|
||||
'w'
|
||||
);
|
||||
} catch (\IntlException $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
));
|
||||
Locale::setDefault('xx');
|
||||
var_dump(new IntlDateFormatter(Locale::getDefault()));
|
||||
--EXPECT--
|
||||
datefmt_create: invalid locale: U_ILLEGAL_ARGUMENT_ERROR
|
||||
object(IntlDateFormatter)#1 (0) {
|
||||
}
|
||||
object(IntlDateFormatter)#1 (0) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue