From 9eedf0020633c28ac853d138ffc4e1f6c03af4a8 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com> Date: Tue, 9 Sep 2025 08:41:20 +0200 Subject: [PATCH 1/2] Fix intl tests naming (#19763) --- ext/intl/tests/gh11942_datefmt_locale_canonicalization.phpt | 2 +- ext/intl/tests/gh11942_numfmt_locale_canonicalization.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/intl/tests/gh11942_datefmt_locale_canonicalization.phpt b/ext/intl/tests/gh11942_datefmt_locale_canonicalization.phpt index aec539ff14d..26b0234fd3b 100644 --- a/ext/intl/tests/gh11942_datefmt_locale_canonicalization.phpt +++ b/ext/intl/tests/gh11942_datefmt_locale_canonicalization.phpt @@ -1,5 +1,5 @@ --TEST-- -Fix GH-11942: IntlDateFormatter should canonicalize locale strings +GH-11942 (IntlDateFormatter should canonicalize locale strings) --EXTENSIONS-- intl --FILE-- diff --git a/ext/intl/tests/gh11942_numfmt_locale_canonicalization.phpt b/ext/intl/tests/gh11942_numfmt_locale_canonicalization.phpt index 9a17c336729..bdb753d6127 100644 --- a/ext/intl/tests/gh11942_numfmt_locale_canonicalization.phpt +++ b/ext/intl/tests/gh11942_numfmt_locale_canonicalization.phpt @@ -1,5 +1,5 @@ --TEST-- -Fix GH-11942: NumberFormatter should canonicalize locale strings +GH-11942 (NumberFormatter should canonicalize locale strings) --EXTENSIONS-- intl --FILE-- From b718514dc207317125fce97f9184b945192810f0 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com> Date: Tue, 9 Sep 2025 08:41:32 +0200 Subject: [PATCH 2/2] Fix memory leak when providing an invalid locale to IntlDateFormatter (#19764) --- ext/intl/dateformat/dateformat_create.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index 853de5aecc0..c2853bb906f 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -119,8 +119,8 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_error_handlin 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 */