Signal that the stream option passed is an error

Otherwise this falls through to the next case statement.
This commit is contained in:
George Peter Banyard 2021-04-19 13:46:18 +01:00 committed by George Peter Banyard
parent 71cbef78ba
commit cef0076a88

View file

@ -918,6 +918,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
case PHP_STREAM_SYNC_FDSYNC: case PHP_STREAM_SYNC_FDSYNC:
return php_stdiop_sync(stream, 1) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; return php_stdiop_sync(stream, 1) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR;
} }
/* Invalid option passed */
return PHP_STREAM_OPTION_RETURN_ERR;
case PHP_STREAM_OPTION_TRUNCATE_API: case PHP_STREAM_OPTION_TRUNCATE_API:
switch (value) { switch (value) {