mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/intl: change when the locale is invalid for the 8.1/8.2 serie.
does not throws an exception as it's considered as a too string change, but the code user still needs to double check.
This commit is contained in:
parent
fe3a819e32
commit
0da1356c66
3 changed files with 13 additions and 9 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue