- #51854, fix logic (patch by Tjerk)

This commit is contained in:
Pierre Joye 2010-05-18 19:39:39 +00:00
parent c91c86b743
commit 0d47dff287

View File

@ -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;