From 5d6519a9bd6e7ef711398d1f99d31f942fe36334 Mon Sep 17 00:00:00 2001 From: Ivan Zorin Date: Sat, 7 Nov 2026 02:06:46 +0300 Subject: [PATCH] Fix zlib.inflate test expectation after GH-22063 GH-22063 prevents stream_filter_remove() from modifying a filter chain while it is being applied, rejecting removal with a warning instead. The pre-existing zlib.inflate regression test still expects successful filter removal from inside its error handler, so it now fails across multiple CI platforms on the unmodified PHP-8.4 branch. Update the expected output to assert the new warning and false result. Only the PHPT test is changed; this does not alter runtime behavior. Follow-up to php/php-src#22083. --- ..._filter_inflate_error_handler_removes_filter.phpt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ext/zlib/tests/zlib_filter_inflate_error_handler_removes_filter.phpt b/ext/zlib/tests/zlib_filter_inflate_error_handler_removes_filter.phpt index ee5bab1052fc..fbb06b769503 100644 --- a/ext/zlib/tests/zlib_filter_inflate_error_handler_removes_filter.phpt +++ b/ext/zlib/tests/zlib_filter_inflate_error_handler_removes_filter.phpt @@ -1,5 +1,5 @@ --TEST-- -zlib.inflate filter removed by the error handler of its own notice +zlib.inflate filter removal denied while handling its own notice --EXTENSIONS-- zlib --FILE-- @@ -20,11 +20,15 @@ $filter = stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); var_dump(fread($fp, 10)); echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- fwrite(): zlib: data error -bool(true) + +Warning: stream_filter_remove(): Cannot remove filter while it is being applied in %s on line %d +bool(false) bool(false) fread(): zlib: data error -bool(true) + +Warning: stream_filter_remove(): Cannot remove filter while it is being applied in %s on line %d +bool(false) bool(false) Done