Skip to content

Commit 3ee8172

Browse files
committed
fix position handling
1 parent d661fa4 commit 3ee8172

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main/streams.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,10 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS
519519
didread += toread;
520520
}
521521

522-
if (size == 0)
522+
if (size == 0) {
523+
stream->position += didread;
523524
return didread;
525+
}
524526

525527
if (stream->flags & PHP_STREAM_FLAG_NO_BUFFER || stream->chunk_size == 1) {
526528
if (stream->filterhead) {

0 commit comments

Comments
 (0)