diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2014-08-25 12:52:06 -0400 |
---|---|---|
committer | Clark Tomlinson <fallen013@gmail.com> | 2014-08-25 12:52:06 -0400 |
commit | 6523c575f3775310aa7c83e1e95b3382cf4c8b65 (patch) | |
tree | 90b33fce4c07ca64fc7ec97746b462319ea47876 | |
parent | 58ab10551546c8035de69bc55ffabdc1e5627b4f (diff) | |
parent | 989da69cffbdd7f3a7e7f6635b465428d7ffe14f (diff) | |
download | nextcloud-server-6523c575f3775310aa7c83e1e95b3382cf4c8b65.tar.gz nextcloud-server-6523c575f3775310aa7c83e1e95b3382cf4c8b65.zip |
Merge pull request #10623 from owncloud/not-a-valid-resource-log-entries
Do not try to close the same resource multiple times
-rw-r--r-- | lib/private/files/view.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 1037056b0fb..d310a0fa4e1 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -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 { |