]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #39034 (curl_exec() with return transfer returns TRUE on
authorIlia Alshanetsky <iliaa@php.net>
Tue, 10 Oct 2006 23:13:13 +0000 (23:13 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 10 Oct 2006 23:13:13 +0000 (23:13 +0000)
empty files).

ext/curl/interface.c

index ec811ad5e6325e94f55beed3f5e369cda8f4fdd8..a70950e9bf7f07425b84b911af1b5724c488ad96 100644 (file)
@@ -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;
+       }
 }
 /* }}} */