diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-18 14:42:20 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-18 14:42:20 +0200 |
| commit | be7f405f6bf3b4532f844fe9aeb92aea9f9ca02c (patch) | |
| tree | 6397bff7ee88080e49ee9857b3aa50ef97e485b1 /ext/curl/multi.c | |
| parent | 55d34f7023ec8a3632423c14c03a7ac6e0693143 (diff) | |
| parent | 4a9f78f9d79ef999ba51a22ee03da8bdd92356f3 (diff) | |
| download | php-git-be7f405f6bf3b4532f844fe9aeb92aea9f9ca02c.tar.gz | |
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'ext/curl/multi.c')
| -rw-r--r-- | ext/curl/multi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 8967f7822a..4ba165a09d 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -333,6 +333,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) @@ -370,6 +371,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 */ |
