Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
review
  • Loading branch information
devnexen committed Oct 1, 2025
commit 883c04ff9c348e136e08ab82d186ee761369e01f
5 changes: 2 additions & 3 deletions ext/standard/tests/streams/gh19705.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ zlib
--FILE--
<?php
$fh = fopen('data://text/plain,', 'w+',);
$v_249671 = stream_filter_append($fh, 'zlib.deflate',2,);
var_dump(stream_filter_append($fh, 'zlib.deflate',STREAM_FILTER_WRITE));
?>
--EXPECTF--

Notice: PHP Request Shutdown: Stream is not writable in Unknown on line %d
resource(%d) of type (stream filter)
6 changes: 1 addition & 5 deletions main/streams/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,12 +1279,8 @@ static ssize_t _php_stream_write_filtered(php_stream *stream, const char *buf, s
PHPAPI int _php_stream_flush(php_stream *stream, int closing)
{
int ret = 0;
if (stream->ops->write == NULL) {
php_error_docref(NULL, E_NOTICE, "Stream is not writable");
return 0;
}

if (stream->writefilters.head) {
if (stream->writefilters.head && stream->ops->write) {
_php_stream_write_filtered(stream, NULL, 0, closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC );
}

Expand Down
Loading