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

NEWS
ext/curl/curl.c

diff --git a/NEWS b/NEWS
index 3bad981dd488a61e8ac804101c544e7f881c2615..ae1b52baf8ed33a64d6b4e9d94f207ca104a4ec5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP 4                                                                      NEWS
 ?? ??? 2006, Version 4.4.5
 - Updated PCRE to version 6.7. (Ilia)
 - Fixed missing open_basedir check inside chdir() function. (Ilia)
+- Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty
+  files). (Ilia)
 - Fixed bug #38963 (Fixed a possible open_basedir bypass in tempnam()). (Ilia)
 - Fixed bug #38859 (parse_url() fails if passing '@' in passwd). (Tony,Ilia)
 - Fixed bug #38534 (segfault when calling setlocale() in userspace session
index ddf022c2ddbe913560401f80b002c86cf43143e7..0e361b3d4b60244dac92e3207a50db35ab8af8ed 100644 (file)
@@ -1299,6 +1299,8 @@ PHP_FUNCTION(curl_exec)
                if (ch->handlers->write->type != PHP_CURL_BINARY) 
                        smart_str_0(&ch->handlers->write->buf);
                RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 0);
+       } else if (ch->handlers->write->method == PHP_CURL_RETURN) {
+               RETURN_STRINGL("", sizeof("") - 1, 0);
        }
 
        RETURN_TRUE;