mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix memory leak when providing an invalid locale to IntlDateFormatter (#19764) Fix intl tests naming (#19763)
This commit is contained in:
@@ -115,8 +115,8 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
locale = Locale::createFromName(final_locale);
|
||||
/* get*Name accessors being set does not preclude being bogus */
|
||||
if (locale.isBogus() || ((locale_len == 1 && locale_str[0] != 'C') || (locale_len > 1 && strlen(locale.getISO3Language()) == 0))) {
|
||||
zend_argument_value_error(1, "\"%s\" is invalid", locale_str);
|
||||
return FAILURE;
|
||||
zend_argument_value_error(1, "\"%s\" is invalid", locale_str);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* process calendar */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Fix GH-11942: IntlDateFormatter should canonicalize locale strings
|
||||
GH-11942 (IntlDateFormatter should canonicalize locale strings)
|
||||
--EXTENSIONS--
|
||||
intl
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Fix GH-11942: NumberFormatter should canonicalize locale strings
|
||||
GH-11942 (NumberFormatter should canonicalize locale strings)
|
||||
--EXTENSIONS--
|
||||
intl
|
||||
--FILE--
|
||||
|
||||
Reference in New Issue
Block a user