fclose(): supplied resource is not a valid stream resource
JosefSommerauer opened this issue · 1 comments
JosefSommerauer commented
Some files throw fclose(): supplied resource is not a valid stream resource
Error.
Suggested fix:
private function fclose(ResourceValue $handle)
{
if (is_resource($handle->getResource())) {
fclose($handle->getResource());
}
}
simon816 commented
Thanks for the bug report. I've fixed this in a slightly different way - by tracking whether a file handle has been closed and ignoring file handle functions once it's closed.