diff options
-rwxr-xr-x | main/streams/streams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index ccb7e34632..c586d0110f 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1186,7 +1186,7 @@ PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, voi /* try to match the buffer mode as best we can */ if (value == PHP_STREAM_BUFFER_NONE) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; - } else { + } else if (stream->flags & PHP_STREAM_FLAG_NO_BUFFER) { stream->flags ^= PHP_STREAM_FLAG_NO_BUFFER; } ret = PHP_STREAM_OPTION_RETURN_OK; |