summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-18 14:41:22 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-18 14:41:35 +0200
commit4a9f78f9d79ef999ba51a22ee03da8bdd92356f3 (patch)
tree5413cf103ab5a1e5fad5f9d08b6597036882c30f /ext/curl/multi.c
parent79efd55fc366e3b33c6730f0bfa2cbf9f89d4368 (diff)
parentc8c183eb62b666b5e9c92ca2cbf13f5464ae3aa9 (diff)
downloadphp-git-4a9f78f9d79ef999ba51a22ee03da8bdd92356f3.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r--ext/curl/multi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index bebe5d19c2..d10a03f741 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -334,6 +334,7 @@ PHP_FUNCTION(curl_multi_info_read)
CURLMsg *tmp_msg;
int queued_msgs;
zval *zmsgs_in_queue = NULL;
+ php_curl *ch;
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_RESOURCE(z_mh)
@@ -371,6 +372,10 @@ PHP_FUNCTION(curl_multi_info_read)
being done in add_assoc_resource */
Z_ADDREF_P(pz_ch);
+ /* we must save result to be able to read error message */
+ ch = (php_curl*)zend_fetch_resource(Z_RES_P(pz_ch), le_curl_name, le_curl);
+ SAVE_CURL_ERROR(ch, tmp_msg->data.result);
+
/* add_assoc_resource automatically creates a new zval to
wrap the "resource" represented by the current pz_ch */