Skip to content

Commit

Permalink
ext/intl: fix bug introduced by 5455c3f
Browse files Browse the repository at this point in the history
was meant to fix GH-12943.

Close GH-13001.
  • Loading branch information
devnexen committed Jan 3, 2024
1 parent 5d79c1b commit 96ffe6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/intl/dateformat/dateformat_create.cpp
Expand Up @@ -112,7 +112,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() || ((locale_len == 1 && locale_str[0] != 'C') && strlen(locale.getISO3Language()) == 0)) {
if (locale.isBogus() || ((locale_len == 1 && locale_str[0] != 'C') || (locale_len > 1 && strlen(locale.getISO3Language()) == 0))) {
goto error;
}

Expand Down

0 comments on commit 96ffe6a

Please sign in to comment.