Skip to content
Snippets Groups Projects
Commit 6523c575 authored by Clark Tomlinson's avatar Clark Tomlinson
Browse files

Merge pull request #10623 from owncloud/not-a-valid-resource-log-entries

Do not try to close the same resource multiple times
parents 58ab1055 989da69c
Branches
No related tags found
No related merge requests found
......@@ -670,7 +670,12 @@ class View {
$source = fopen($tmpFile, 'r');
if ($source) {
$this->file_put_contents($path, $source);
// $this->file_put_contents() might have already closed
// the resource, so we check it, before trying to close it
// to avoid messages in the error log.
if (is_resource($source)) {
fclose($source);
}
unlink($tmpFile);
return true;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment