summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-05-18 19:39:39 +0000
committerPierre Joye <pajoye@php.net>2010-05-18 19:39:39 +0000
commit3a19fee38b3ca6d02fd854b6128877889a662180 (patch)
tree6d8208e5e9160326849747dd9722a6be1816aa85
parentbf31c00948d89c865392437a0ff98c60b7d9959a (diff)
downloadphp-git-3a19fee38b3ca6d02fd854b6128877889a662180.tar.gz
- #51854, fix logic (patch by Tjerk)
-rwxr-xr-xmain/streams/streams.c2
1 files changed, 1 insertions, 1 deletions
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;