From aea4195ac6be71ca9fb04317dd9f2be19a5b0e62 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 14 Jul 2006 19:14:40 +0000 Subject: [PATCH] #38105 (1/3) Backward logic, filter_product == IS_STRING means the wrapper HAS applied pre-filtering --- main/streams/streams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/streams/streams.c b/main/streams/streams.c index 222896deab..e150cf36fb 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2303,7 +2303,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio /* Output encoding on text mode streams defaults to utf8 unless specified in context parameter */ if (stream && strchr(implicit_mode, 't') && UG(unicode)) { /* Only apply implicit unicode.to. filter if the wrapper didn't do it for us */ - if ((php_stream_filter_product(&stream->writefilters, IS_UNICODE) == IS_STRING) && + if ((php_stream_filter_product(&stream->writefilters, IS_UNICODE) == IS_UNICODE) && (strchr(implicit_mode, 'w') || strchr(implicit_mode, 'a') || strchr(implicit_mode, '+'))) { char *encoding = (context && context->output_encoding) ? context->output_encoding : "utf8"; -- 2.40.0