From: Marcus Boerger Date: Tue, 28 Feb 2006 14:44:23 +0000 (+0000) Subject: - Need to set eof flag when inner stream has eof condition X-Git-Tag: RELEASE_1_2~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40a610887d90837153275582104f31afb3e5c5f1;p=php - Need to set eof flag when inner stream has eof condition --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 1586d42f7e..01ec4970a7 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1028,7 +1028,13 @@ static size_t phar_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) / { phar_entry_data *data = (phar_entry_data *)stream->abstract; - return php_stream_read(data->fp, buf, count); + size_t got = php_stream_read(data->fp, buf, count); + + if (data->fp->eof) { + stream->eof = 1; + } + + return got; } /* }}} */