From: Rasmus Lerdorf Date: Tue, 9 Mar 2004 17:06:53 +0000 (+0000) Subject: Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to X-Git-Tag: php-4.3.5RC4~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89eaec22b5f2005c62461b17db3ff0ef3642f25a;p=php Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to stdout as is implied in the documentation. Currently it simply does absolutely nothing and there is no way to reset it to stdout. --- diff --git a/ext/curl/curl.c b/ext/curl/curl.c index 64c637bb1b..93b1a80cbf 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -802,7 +802,9 @@ PHP_FUNCTION(curl_setopt) if (Z_LVAL_PP(zvalue)) { ch->handlers->write->method = PHP_CURL_RETURN; - } + } else { + ch->handlers->write->method = PHP_CURL_STDOUT; + } break; case CURLOPT_BINARYTRANSFER: convert_to_long_ex(zvalue);