Skip to content

Commit 9617c45

Browse files
committed
Use PHP_STREAM_CAST_MASK to mask flags in castas param
1 parent 90be849 commit 9617c45

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main/streams/userspace.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,8 +1384,10 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr)
13841384
php_stream * intstream = NULL;
13851385
int call_result;
13861386
int ret = FAILURE;
1387-
bool report_errors = !(castas & PHP_STREAM_FLAG_SUPPRESS_ERRORS);
1388-
castas &= ~PHP_STREAM_FLAG_SUPPRESS_ERRORS;
1387+
1388+
int flags = castas & PHP_STREAM_CAST_MASK;
1389+
castas &= ~PHP_STREAM_CAST_MASK;
1390+
bool report_errors = !(flags & PHP_STREAM_FLAG_SUPPRESS_ERRORS);
13891391

13901392
ZVAL_STRINGL(&func_name, USERSTREAM_CAST, sizeof(USERSTREAM_CAST)-1);
13911393

0 commit comments

Comments
 (0)