diff options
author | Ondřej Surý <ondrej@sury.org> | 2015-01-26 11:52:53 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2015-01-26 11:52:53 +0100 |
commit | 832b62efb8fceebb220116d8024d945a9bd31d7e (patch) | |
tree | e3c65d02b50180c7d7d7c21626d403d2eb87793a /ext/curl/multi.c | |
parent | 60fede4c90746ef3408ed27a15dd405b3a46a83b (diff) | |
download | php-upstream/5.6.5+dfsg.tar.gz |
New upstream version 5.6.5+dfsgupstream/5.6.5+dfsg
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r-- | ext/curl/multi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 9fbea5518..0c21fe1b5 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(); } /* }}} */ |