Skip to content

Commit dc09366

Browse files
committed
add test
1 parent b97b405 commit dc09366

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ext/spl/tests/gh20678.phpt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
GH-20678 (resource created by GlobalIterator crashes when it is called with fclose())
3+
--CREDITS--
4+
chongwick
5+
--FILE--
6+
<?php
7+
$iter = new GlobIterator(__DIR__ . '/*.abcdefghij');
8+
$resources = get_resources();
9+
$resource = end($resources);
10+
fclose($resource);
11+
?>
12+
--EXPECTF--
13+
14+
Warning: fclose(): %d is not a valid stream resource in %s on line %d

0 commit comments

Comments
 (0)