[php-src] PHP-8.5: Fix argument number in curl_multi_setopt() CURLMOPT_PUSHFUNCTION error (#25367)

From: Date: Tue, 10 Nov 2026 15:39:17 +0000
Subject: [php-src] PHP-8.5: Fix argument number in curl_multi_setopt() CURLMOPT_PUSHFUNCTION error (#25367)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143537@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: TimWolla Date: 2026-11-10T16:38:55+01:00 Commit: https://github.com/php/php-src/commit/8aea4816ae53f19bee028cb342238357e72df910 Raw diff: https://github.com/php/php-src/commit/8aea4816ae53f19bee028cb342238357e72df910.diff Fix argument number in curl_multi_setopt() CURLMOPT_PUSHFUNCTION error (#25367) Changed paths: M ext/curl/multi.c M ext/curl/tests/curl_multi_setopt_callables.phpt Diff: diff --git a/ext/curl/multi.c b/ext/curl/multi.c index a484373c107b..c4a0ac2e82e4 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -460,7 +460,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 c0de5add4910..ab3d1b9f3172 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

« previous php.cvs (#143537) next »