Commit 534d28a54ce for php.net
commit 534d28a54cec06ce266c672cccab684103f71d96
Merge: 50decba4a80 9e68cf888ac
Author: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Date: Fri Jun 12 23:21:23 2026 +0800
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
ext/intl: Sync IntlTimeZone object errors for invalid display types
diff --cc NEWS
index 51775f01961,800423779d1..2eab6d8a6d5
--- a/NEWS
+++ b/NEWS
@@@ -13,17 -13,25 +13,21 @@@ PH
- GD:
. Fixed bug GH-22121 (Double free in gdImageSetStyle() after
overflow-triggered early return). (iliaal)
- . Fixed bug GH-19666 (imageconvolution() unexpected nan filter value).
- (David Carlier)
- . Fixed bug GH-19739 (imageellipse/imagefilledellipse overflow).
- (David Carlier)
- . Fixed bug GH-19730 (imageaffine overflow).
- (David Carlier)
+ - Intl:
- . Fix incorrect argument positions for uninitialized calendar arguments in
- IntlCalendar::equals(), ::before(), ::after(), and ::isEquivalentTo().
- (Weilin Du)
+ . Fixed IntlTimeZone::getDisplayName() to synchronize object error state
+ for invalid display types. (Weilin Du)
- . Fixed Spoofchecker restriction-level APIs to only be exposed with ICU 53
- and later. (Graham Campbell)
+
-- mysqli:
- . Fix stmt->query leak in mysqli_execute_query() validation errors.
- (David Carlier)
+- URI:
+ . Add LEXBOR_STATIC to CFLAGS_URI on Windows so ext/uri does not see
+ LXB_API as __declspec(dllimport) when linked statically into PHP.
+ (Luther Monson)
+ . Clean error logs before each Uri\WhatWg\Url wither call so that errors from
+ previous wither calls are not returned the next time a UrlValidationError
+ is thrown. (kocsismate)
+
+- Opcache:
+ . Fixed bug GH-22265 (Another tailcall vm_interrupt bug). (Levi Morrison)
- Phar:
. Fixed a bypass of the magic ".phar" directory protection in
diff --cc ext/intl/tests/timezone_getDisplayName_error.phpt
index ca845b2830e,8cecb40ecfe..032b22e5090
--- a/ext/intl/tests/timezone_getDisplayName_error.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_error.phpt
@@@ -8,8 -9,20 +8,12 @@@ int
$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
var_dump($tz->getDisplayName(false, -1));
echo intl_get_error_message(), PHP_EOL;
+ var_dump($tz->getErrorCode());
+ echo $tz->getErrorMessage(), PHP_EOL;
-var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT'));
?>
---EXPECTF--
-Warning: IntlTimeZone::getDisplayName(): wrong display type in %s on line %d
+--EXPECT--
bool(false)
-wrong display type: U_ILLEGAL_ARGUMENT_ERROR
+IntlTimeZone::getDisplayName(): wrong display type: U_ILLEGAL_ARGUMENT_ERROR
+ int(1)
-wrong display type: U_ILLEGAL_ARGUMENT_ERROR
-
-Fatal error: Uncaught TypeError: intltz_get_display_name(): Argument #1 ($timezone) must be of type IntlTimeZone, null given in %s:%d
-Stack trace:
-#0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT')
-#1 {main}
- thrown in %s on line %d
++IntlTimeZone::getDisplayName(): wrong display type: U_ILLEGAL_ARGUMENT_ERROR
diff --cc ext/intl/timezone/timezone_methods.cpp
index 3de186a9ca0,e3aa958508c..5f71bef2c90
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@@ -489,7 -521,8 +491,8 @@@ U_CFUNC PHP_FUNCTION(intltz_get_display
found = true;
}
if (!found) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "wrong display type");
+ intl_errors_set(TIMEZONE_ERROR_P(to), U_ILLEGAL_ARGUMENT_ERROR,
- "wrong display type", 0);
++ "wrong display type");
RETURN_FALSE;
}