mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
dont throw errors on double close in stream wrapper
This commit is contained in:
parent
22ef9fc5b5
commit
93bce47220
2 changed files with 14 additions and 1 deletions
|
|
@ -140,4 +140,15 @@ abstract class WrapperTest extends TestCase {
|
|||
rewinddir($wrapped);
|
||||
$this->assertSame($content[0], readdir($wrapped));
|
||||
}
|
||||
|
||||
public function testDoubleClose() {
|
||||
$source = fopen('php://temp', 'r+');
|
||||
rewind($source);
|
||||
|
||||
$wrapped = $this->wrapSource($source);
|
||||
|
||||
fclose($source);
|
||||
fclose($wrapped);
|
||||
$this->assertFalse(is_resource($source));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue