Skip to content

Commit 0f78d86

Browse files
committed
we need to use the full stream wrapper for filters
1 parent 41d7811 commit 0f78d86

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ext/standard/php_fopen_wrapper.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count
7373
{
7474
php_stream *inner = stream->abstract;
7575

76-
if (inner && inner->ops->read) {
77-
size_t read = inner->ops->read(inner, buf, count TSRMLS_CC);
76+
if (inner) {
77+
size_t read = php_stream_read(inner, buf, count);
7878
stream->eof = inner->eof;
7979
return read;
8080
}
@@ -99,8 +99,10 @@ static int php_stream_input_seek(php_stream *stream, off_t offset, int whence, o
9999
{
100100
php_stream *inner = stream->abstract;
101101

102-
if (inner && inner->ops->seek) {
103-
return inner->ops->seek(inner, offset, whence, newoffset TSRMLS_CC);
102+
if (inner) {
103+
int sought = php_stream_seek(inner, offset, whence);
104+
*newoffset = inner->position;
105+
return sought;
104106
}
105107

106108
return -1;

0 commit comments

Comments
 (0)