diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-10-10 23:12:59 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-10-10 23:12:59 +0000 |
commit | 03641dcea48442fcdc29a464b98e5093306a3d28 (patch) | |
tree | 6c3336307d6c9e0a2e4862f55a37fdf66637d21a | |
parent | 7b58554f82bac7d9f191382d0cc54d016ef250b7 (diff) | |
download | php-git-03641dcea48442fcdc29a464b98e5093306a3d28.tar.gz |
Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty
files).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/curl/interface.c | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -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) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 56496843a5..4e387bbc65 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -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; + } } /* }}} */ |