diff options
Diffstat (limited to 'main/streams/memory.c')
| -rw-r--r-- | main/streams/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index a61bd6619e..a9b3f01cb8 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -237,7 +237,7 @@ PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length ST if ((stream = php_stream_memory_create_rel(mode)) != NULL) { ms = stream->abstract; - if (mode == TEMP_STREAM_READONLY) { + if (mode == TEMP_STREAM_READONLY || mode == TEMP_STREAM_TAKE_BUFFER) { /* use the buffer directly */ ms->data = buf; ms->fsize = length; |
