com php-src: Fixed bug #67643 (curl_multi_getcontent re turns '' when CURLOPT_RETURNTRANSFER isn't se t): NEWS ext/curl/multi.c
| From: | Stanislav Malyshev | Date: | Thu, 17 Jul 2014 15:21:52 +0000 |
| Subject: | com php-src: Fixed bug #67643 (curl_multi_getcontent re turns '' when CURLOPT_RETURNTRANSFER isn't se t): NEWS ext/curl/multi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83437@lists.php.net to get a copy of this message | ||
Commit: acd0d7b4037de9498ee5686b90b349342db08f4c
Author: Jille Timmermans <jille@quis.cx> Thu, 17 Jul 2014 17:21:52 +0200
Parents: 81c42db7b7799ea0826fe0dfb5ba399509a9affb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=acd0d7b4037de9498ee5686b90b349342db08f4c
Log:
Fixed bug #67643 (curl_multi_getcontent returns '' when CURLOPT_RETURNTRANSFER isn't
set)
Bugs:
https://bugs.php.net/67643
Changed paths:
M NEWS
M ext/curl/multi.c
Diff:
diff --git a/NEWS b/NEWS
index 1badfb8..6267baf 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ PHP NEWS
(Adam)
. Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
+- cURL:
+ . Fixed bug #67643 (curl_multi_getcontent returns '' when CURLOPT_RETURNTRANSFER
isn't set). (Jille Timmermans)
+
- DBA:
. Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 9fbea55..0c21fe1 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -244,12 +244,15 @@ PHP_FUNCTION(curl_multi_getcontent)
ZEND_FETCH_RESOURCE(ch, php_curl *, &z_ch, -1, le_curl_name, le_curl);
- if (ch->handlers->write->method == PHP_CURL_RETURN &&
ch->handlers->write->buf.len > 0) {
+ if (ch->handlers->write->method == PHP_CURL_RETURN) {
+ if (ch->handlers->write->buf.len == 0) {
+ RETURN_EMPTY_STRING();
+ }
smart_str_0(&ch->handlers->write->buf);
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
}
- RETURN_EMPTY_STRING();
+ RETURN_NULL();
}
/* }}} */