1
0
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:
Alexandre Daubois
2025-09-09 08:42:34 +02:00
3 changed files with 4 additions and 4 deletions

View File

@@ -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 */

View File

@@ -1,5 +1,5 @@
--TEST--
Fix GH-11942: IntlDateFormatter should canonicalize locale strings
GH-11942 (IntlDateFormatter should canonicalize locale strings)
--EXTENSIONS--
intl
--FILE--

View File

@@ -1,5 +1,5 @@
--TEST--
Fix GH-11942: NumberFormatter should canonicalize locale strings
GH-11942 (NumberFormatter should canonicalize locale strings)
--EXTENSIONS--
intl
--FILE--