Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty

files).
This commit is contained in:
Ilia Alshanetsky 2006-10-10 23:12:59 +00:00
parent 7b58554f82
commit 03641dcea4
2 changed files with 7 additions and 1 deletions

View 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;
}
}
/* }}} */