diff options
author | Wez Furlong <wez@php.net> | 2002-09-26 16:22:28 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-09-26 16:22:28 +0000 |
commit | a95fb6bfd68f4a6ac1d019e0bda7b384d6dc30cc (patch) | |
tree | b67e78e4f802312e7825679257180c5350eca33d | |
parent | 4d9d06c87495c0afc0c912708191b6ab18997dbf (diff) | |
download | php-git-a95fb6bfd68f4a6ac1d019e0bda7b384d6dc30cc.tar.gz |
Fix for #19580. (Incorrectly warning about lost data when that is not the
case on systems without fopencookie).
-rwxr-xr-x | main/streams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams.c b/main/streams.c index ba8176dd63..432f27fad1 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1580,7 +1580,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show exit_success: - if (stream->writepos && stream->fclose_stdiocast != PHP_STREAM_FCLOSE_FOPENCOOKIE) { + if ((stream->writepos - stream->readpos) > 0 && stream->fclose_stdiocast != PHP_STREAM_FCLOSE_FOPENCOOKIE) { /* the data we have buffered will be lost to the third party library that * will be accessing the stream. Emit a warning so that the end-user will * know that they should try something else */ |