[php-src] PHP-8.6: ext/zlib: Expect denied filter removal in error handler test
| From: | Ilia Alshanetsky | Date: | Fri, 06 Nov 2026 23:26:27 +0000 |
| Subject: | [php-src] PHP-8.6: ext/zlib: Expect denied filter removal in error handler test | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143373@lists.php.net to get a copy of this message | ||
Author: Ilia Alshanetsky (iliaal)
Date: 2026-11-06T18:24:36-05:00
Commit: https://github.com/php/php-src/commit/3b749a604aeea38a6ea4626068d227c7e0ce05c6
Raw diff: https://github.com/php/php-src/commit/3b749a604aeea38a6ea4626068d227c7e0ce05c6.diff
ext/zlib: Expect denied filter removal in error handler test
Since GH-22063, stream_filter_remove() refuses a filter whose chain is
being applied, which covers an error handler run from the zlib.inflate
notice. The filter is no longer freed there, so the test now expects the
warning and false.
Changed paths:
M ext/zlib/tests/zlib_filter_inflate_error_handler_removes_filter.phpt
Diff:
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..d1ef98783b64 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
@@ -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