@@ -2038,15 +2038,15 @@ PHPAPI php_stream *_php_stream_opendir(const char *path, int options,
2038
2038
2039
2039
if (wrapper && wrapper -> wops -> dir_opener ) {
2040
2040
stream = wrapper -> wops -> dir_opener (wrapper ,
2041
- path_to_open , "r" , options ^ REPORT_ERRORS , NULL ,
2041
+ path_to_open , "r" , options & ~ REPORT_ERRORS , NULL ,
2042
2042
context STREAMS_REL_CC );
2043
2043
2044
2044
if (stream ) {
2045
2045
stream -> wrapper = wrapper ;
2046
2046
stream -> flags |= PHP_STREAM_FLAG_NO_BUFFER | PHP_STREAM_FLAG_IS_DIR ;
2047
2047
}
2048
2048
} else if (wrapper ) {
2049
- php_stream_wrapper_log_error (wrapper , options ^ REPORT_ERRORS , "not implemented" );
2049
+ php_stream_wrapper_log_error (wrapper , options & ~ REPORT_ERRORS , "not implemented" );
2050
2050
}
2051
2051
if (stream == NULL && (options & REPORT_ERRORS )) {
2052
2052
php_stream_display_wrapper_errors (wrapper , path , "Failed to open directory" );
@@ -2115,18 +2115,18 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod
2115
2115
2116
2116
if (wrapper ) {
2117
2117
if (!wrapper -> wops -> stream_opener ) {
2118
- php_stream_wrapper_log_error (wrapper , options ^ REPORT_ERRORS ,
2118
+ php_stream_wrapper_log_error (wrapper , options & ~ REPORT_ERRORS ,
2119
2119
"wrapper does not support stream open" );
2120
2120
} else {
2121
2121
stream = wrapper -> wops -> stream_opener (wrapper ,
2122
- path_to_open , mode , options ^ REPORT_ERRORS ,
2122
+ path_to_open , mode , options & ~ REPORT_ERRORS ,
2123
2123
opened_path , context STREAMS_REL_CC );
2124
2124
}
2125
2125
2126
2126
/* if the caller asked for a persistent stream but the wrapper did not
2127
2127
* return one, force an error here */
2128
2128
if (stream && (options & STREAM_OPEN_PERSISTENT ) && !stream -> is_persistent ) {
2129
- php_stream_wrapper_log_error (wrapper , options ^ REPORT_ERRORS ,
2129
+ php_stream_wrapper_log_error (wrapper , options & ~ REPORT_ERRORS ,
2130
2130
"wrapper does not support persistent streams" );
2131
2131
php_stream_close (stream );
2132
2132
stream = NULL ;
@@ -2183,7 +2183,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod
2183
2183
tmp );
2184
2184
efree (tmp );
2185
2185
2186
- options ^= REPORT_ERRORS ;
2186
+ options &= ~ REPORT_ERRORS ;
2187
2187
}
2188
2188
}
2189
2189
}
0 commit comments