Merge branch 'PHP-8.3'

This commit is contained in:
David Carlier 2023-12-22 17:28:29 +00:00
commit 5455c3fc01
2 changed files with 17 additions and 2 deletions

View file

@ -112,8 +112,8 @@ 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) {
zend_argument_value_error(1, "\"%s\" is invalid", locale_str);
if (locale.isBogus() || ((locale_len == 1 && locale_str[0] != 'C') && strlen(locale.getISO3Language()) == 0)) {
zend_argument_value_error(1, "\"%s\" is invalid", locale_str);
return FAILURE;
}