diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-12-26 22:54:39 -0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2015-12-26 22:55:38 -0800 |
commit | 2453a48ab56f25c0900a5baa917cedc88db8e3e1 (patch) | |
tree | 625f2cf0f7417036fc235eeec59e4a55a16485bf /ext/curl/interface.c | |
parent | 60f5c9f87f2d1935fe2c698a3427cca6798ed713 (diff) | |
download | php-git-2453a48ab56f25c0900a5baa917cedc88db8e3e1.tar.gz |
Fixed bug #71225 (curl_setopt() fails to set CURLOPT_POSTFIELDS with reference to CURLFile)
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r-- | ext/curl/interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 7dd04a6d15..8ab850faaa 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2019,6 +2019,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ CURLcode error = CURLE_OK; zend_long lval; + ZVAL_DEREF(zvalue); switch (option) { /* Long options */ case CURLOPT_SSL_VERIFYHOST: @@ -2464,6 +2465,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ } ZEND_HASH_FOREACH_VAL(ph, current) { + ZVAL_DEREF(current); val = zval_get_string(current); slist = curl_slist_append(slist, ZSTR_VAL(val)); zend_string_release(val); @@ -2531,6 +2533,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ zend_string_addref(string_key); } + ZVAL_DEREF(current); if (Z_TYPE_P(current) == IS_OBJECT && instanceof_function(Z_OBJCE_P(current), curl_CURLFile_class)) { /* new-style file upload */ |