Merge pull request #10623 from owncloud/not-a-valid-resource-log-entries
Do not try to close the same resource multiple times
This commit is contained in:
commit
6523c575f3
|
@ -670,7 +670,12 @@ class View {
|
|||
$source = fopen($tmpFile, 'r');
|
||||
if ($source) {
|
||||
$this->file_put_contents($path, $source);
|
||||
fclose($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 {
|
||||
|
|
Loading…
Reference in New Issue