summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-02-20 22:25:42 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-02-20 22:25:42 +0300
commit71d41ca6bb3a9d888b39f34a30f994ac1cf88873 (patch)
tree3a11365b77b332c078440204fb82549d34237a35 /ext/curl/multi.c
parent2d50280dd013556e51b6f275ca965fe7b530029b (diff)
parent1ceec3a053647865493ab417d3ce401b9bc42450 (diff)
downloadphp-71d41ca6bb3a9d888b39f34a30f994ac1cf88873.tar.gz
Merge branch 'master-5.6' of git://anonscm.debian.org/pkg-php/php
Conflicts: debian/changelog debian/patches/series
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r--ext/curl/multi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 9fbea5518..26d8dc01c 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -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();
}
/* }}} */