[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Tue, 10 Nov 2026 15:39:26 +0000
Subject: [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143539@lists.php.net to get a copy of this message
Author: Tim Düsterhus (TimWolla) Date: 2026-11-10T16:39:19+01:00 Commit: https://github.com/php/php-src/commit/09e9e27ffb41fe4dbefaf69bd6411652364f4f89 Raw diff: https://github.com/php/php-src/commit/09e9e27ffb41fe4dbefaf69bd6411652364f4f89.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Fix argument number in curl_multi_setopt() CURLMOPT_PUSHFUNCTION error (#25367) Fix the argument named by the imageaffine() element TypeError (#25369) Changed paths: A ext/gd/tests/imageaffine_element_type_error.phpt M ext/curl/multi.c M ext/curl/tests/curl_multi_setopt_callables.phpt M ext/gd/gd.c Diff: diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 0e329e58f977..1df97d869301 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -480,7 +480,7 @@ static bool _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue char *error_str = NULL; if (UNEXPECTED(!zend_is_callable_ex(zvalue, /* object */ NULL, /* check_flags */ 0, /* callable_name */ NULL, &mh->handlers.server_push, /* error */ &error_str))) { if (!EG(exception)) { - zend_argument_type_error(2, "must be a valid callback for option CURLMOPT_PUSHFUNCTION, %s", error_str); + zend_argument_type_error(3, "must be a valid callback for option CURLMOPT_PUSHFUNCTION, %s", error_str); } efree(error_str); return false; diff --git a/ext/curl/tests/curl_multi_setopt_callables.phpt b/ext/curl/tests/curl_multi_setopt_callables.phpt index 5da1fbf8ef45..0b0d75c640fb 100644 --- a/ext/curl/tests/curl_multi_setopt_callables.phpt +++ b/ext/curl/tests/curl_multi_setopt_callables.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- -TypeError: curl_multi_setopt(): Argument #2 ($option) must be a valid callback for option CURLMOPT_PUSHFUNCTION, function "undefined" not found or invalid function name +TypeError: curl_multi_setopt(): Argument #3 ($value) must be a valid callback for option CURLMOPT_PUSHFUNCTION, function "undefined" not found or invalid function name diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 527ef8968d70..e873ecbe07ec 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4128,7 +4128,7 @@ PHP_FUNCTION(imageaffine) } break; default: - zend_argument_type_error(3, "contains invalid type for element %i", i); + zend_argument_type_error(2, "contains invalid type for element %i", i); RETURN_THROWS(); } } diff --git a/ext/gd/tests/imageaffine_element_type_error.phpt b/ext/gd/tests/imageaffine_element_type_error.phpt new file mode 100644 index 000000000000..e4cf2cc4336f --- /dev/null +++ b/ext/gd/tests/imageaffine_element_type_error.phpt @@ -0,0 +1,15 @@ +--TEST-- +imageaffine(): the TypeError for an invalid element names the $affine argument +--EXTENSIONS-- +gd +--FILE-- +<?php +$im = imagecreatetruecolor(20, 20); +try { + imageaffine($im, [1, 0, null, 1, 0, 0]); +} catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; +} +?> +--EXPECT-- +TypeError: imageaffine(): Argument #2 ($affine) contains invalid type for element 2

« previous php.cvs (#143539) next »