From: Pierre Joye Date: Tue, 18 May 2010 19:39:39 +0000 (+0000) Subject: - #51854, fix logic (patch by Tjerk) X-Git-Tag: php-5.4.0alpha1~191^2~1476 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a19fee38b3ca6d02fd854b6128877889a662180;p=php - #51854, fix logic (patch by Tjerk) --- diff --git a/main/streams/streams.c b/main/streams/streams.c index cbfccb4471..e698d4eb72 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;