From: Ilia Alshanetsky Date: Tue, 10 Oct 2006 23:13:13 +0000 (+0000) Subject: MFB: Fixed bug #39034 (curl_exec() with return transfer returns TRUE on X-Git-Tag: RELEASE_1_0_0RC1~1321 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1032b2eaa3e7287c23a758cab3fa057adc90824b;p=php MFB: Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty files). --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index ec811ad5e6..a70950e9bf 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1669,7 +1669,11 @@ PHP_FUNCTION(curl_exec) RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1); } --ch->uses; - RETURN_TRUE; + if (ch->handlers->write->method == PHP_CURL_RETURN) { + RETURN_EMPTY_STRING(); + } else { + RETURN_TRUE; + } } /* }}} */