diff options
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 d9e6df2c98..d9ace4119c 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -240,12 +240,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.s) { + if (ch->handlers->write->method == PHP_CURL_RETURN) { + if (!ch->handlers->write->buf.s) { + RETURN_EMPTY_STRING(); + } smart_str_0(&ch->handlers->write->buf); RETURN_STR(zend_string_copy(ch->handlers->write->buf.s)); } - RETURN_EMPTY_STRING(); + RETURN_NULL(); } /* }}} */ |
