dont throw errors on double close in stream wrapper

This commit is contained in:
Robin Appelman 2021-03-12 16:48:22 +01:00
commit 93bce47220
2 changed files with 14 additions and 1 deletions

View file

@ -92,7 +92,9 @@ abstract class Wrapper extends WrapperHandler implements File, Directory {
}
public function stream_close() {
return fclose($this->source);
if (is_resource($this->source)) {
return fclose($this->source);
}
}
public function dir_readdir() {