1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/standard/tests/gh21221.phpt
Ilija Tovilo 92ba1e4ea0 Prevent closing of innerstream of php://temp stream
Fixes GH-21221
Closes GH-21222
2026-03-13 20:34:04 +01:00

15 lines
317 B
PHP

--TEST--
GH-21221: Prevent closing of innerstream of php://temp stream
--CREDITS--
chongwick
--FILE--
<?php
$f = fopen('php://temp', 'r+b');
$resources = get_resources();
fclose(end($resources));
?>
--EXPECTF--
Warning: fclose(): cannot close the provided stream, as it must not be manually closed in %s on line %d