[php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5
| From: | Tim Düsterhus | Date: | Tue, 10 Nov 2026 15:39:21 +0000 |
| Subject: | [php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143538@lists.php.net to get a copy of this message | ||
Author: Tim Düsterhus (TimWolla)
Date: 2026-11-10T16:39:06+01:00
Commit: https://github.com/php/php-src/commit/6650a7ded6f93a60efa4abd6dc1e6d2e8419d34e
Raw diff: https://github.com/php/php-src/commit/6650a7ded6f93a60efa4abd6dc1e6d2e8419d34e.diff
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
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 a16155759aed..2b6844f0986c 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -485,7 +485,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 36c2f64901ba..84545458a981 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -4017,7 +4017,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