com php-src: Fixed bug #67643 (curl_multi_getcontent re turns '' when CURLOPT_RETURNTRANSFER isn't se t): ext/curl/multi.c

From: Date: Mon, 01 Dec 2014 06:18:12 +0000
Subject: com php-src: Fixed bug #67643 (curl_multi_getcontent re turns '' when CURLOPT_RETURNTRANSFER isn't se t): ext/curl/multi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83433@lists.php.net to get a copy of this message
Commit: 7049d3450e25788c43c6cb3c5ddf719286569bd1 Author: Jille Timmermans <jille@quis.cx> Thu, 17 Jul 2014 17:21:52 +0200 Committer: Stanislav Malyshev <stas@php.net> Sun, 30 Nov 2014 22:18:12 -0800 Parents: f7eedbe9a685d6047dc04b29121980c2c6773251 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7049d3450e25788c43c6cb3c5ddf719286569bd1 Log: Fixed bug #67643 (curl_multi_getcontent returns '' when CURLOPT_RETURNTRANSFER isn't set) Bugs: https://bugs.php.net/67643 Changed paths: M ext/curl/multi.c Diff: 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(); } /* }}} */

« previous php.cvs (#83433) next »