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

NEWS
ext/curl/interface.c

diff --git a/NEWS b/NEWS
index 5e8334a8b5eb213f2309f07eb188d6d00e9bbab6..9d57af847256a38685375d89539050864611f212 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP                                                                        NEWS
 - Fixed PECL bug #8816 (issue in php_oci_statement_fetch with more than one 
   piecewise column) (jeff at badtz-maru dot com, Tony)
 - Fixed bug #39067 (getDeclaringClass() and private properties). (Tony)
+- Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty
+  files). (Ilia)
 - Fixed bug #38198 (possible crash when COM reports an exception). (Ilia)
 - Fixed bug #37262 (var_export() does not escape \0 character). (Ilia)
 
index 56496843a5da4b5cca850ff52b547d8fea58fadc..4e387bbc65d96efe40eda12ff8bdedf9795ebd33 100644 (file)
@@ -1671,7 +1671,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;
+       }
 }
 /* }}} */