php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #75910
Patch filter-flag-on-eof revision 2018-09-20 05:07 UTC by tenzzor at gmail dot com

Patch filter-flag-on-eof for Streams related Bug #75910

Patch version 2018-09-20 05:07 UTC

Return to Bug #75910 | Download this patch
Patch Revisions:

Developer: tenzzor@gmail.com

diff --git a/main/streams/streams.c b/main/streams/streams.c
index df98bda..dc0347d 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -548,9 +548,12 @@ PHPAPI void _php_stream_fill_read_buffer(php_stream *stream, size_t size)
 
                                flags = PSFS_FLAG_NORMAL;
                        } else {
-                               flags = stream->eof ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC;
+                               flags = PSFS_FLAG_FLUSH_INC;
                        }
 
+                       if (stream->eof) {
+                           flags = PSFS_FLAG_FLUSH_CLOSE;
+                       }
                        /* wind the handle... */
                        for (filter = stream->readfilters.head; filter; filter = filter->next) {
                                status = filter->fops->filter(stream, filter, brig_inp, brig_outp, NULL, flags);

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Aug 26 02:01:27 2019 UTC