From 35c82a75eb91c37977b6e1ee5122c2a8d56b55ec Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 6 Oct 2005 21:31:25 +0000 Subject: [PATCH] - MFH Fix issue (endless loop) with temp/memory streams --- main/streams/memory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main/streams/memory.c b/main/streams/memory.c index 0b4beaf78c..0342c5b923 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -313,7 +313,13 @@ static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count T ts = stream->abstract; assert(ts != NULL); - return php_stream_read(ts->innerstream, buf, count); + size_t got = php_stream_read(ts->innerstream, buf, count); + + if (!got) { + stream->eof |= ts->innerstream->eof; + } + + return got; } /* }}} */ -- 2.50.1