Skip to content

Commit 120562f

Browse files
committed
Signal that the stream option passed is an error
Otherwise this falls through to the next case statement.
1 parent 497fadc commit 120562f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main/streams/plain_wrapper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
918918
case PHP_STREAM_SYNC_FDSYNC:
919919
return php_stdiop_sync(stream, 1) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR;
920920
}
921+
/* Invalid option passed */
922+
return PHP_STREAM_OPTION_RETURN_ERR;
921923

922924
case PHP_STREAM_OPTION_TRUNCATE_API:
923925
switch (value) {

0 commit comments

Comments
 (0)