]> granicus.if.org Git - php/commitdiff
Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
authorRasmus Lerdorf <rasmus@php.net>
Tue, 9 Mar 2004 17:06:53 +0000 (17:06 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Tue, 9 Mar 2004 17:06:53 +0000 (17:06 +0000)
stdout as is implied in the documentation.  Currently it simply does
absolutely nothing and there is no way to reset it to stdout.

ext/curl/curl.c

index 64c637bb1b4501e3cc2f501e7fa1bf3cd30d235f..93b1a80cbf629cd975b6d12eed4b673d2c9ecbb0 100644 (file)
@@ -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);