aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-31 18:37:52 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-01 10:08:16 +0200
commit0067a4eac287928a70a50c925b00777d760e4ec1 (patch)
tree61f7c489efcf0c7151417d57381a83cb6024f14d /lib/private
parentd6ce45fe61c05c0779cfaa3207a538a7a5b9a04c (diff)
downloadnextcloud-server-0067a4eac287928a70a50c925b00777d760e4ec1.tar.gz
nextcloud-server-0067a4eac287928a70a50c925b00777d760e4ec1.zip
Added missing fclose in file_get_contents and file_put_contents
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/storage/common.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 480cf6b5c77..0ce447a5a48 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -119,13 +119,16 @@ abstract class Common implements \OC\Files\Storage\Storage {
return false;
}
$data = stream_get_contents($handle);
+ fclose($handle);
return $data;
}
public function file_put_contents($path, $data) {
$handle = $this->fopen($path, "w");
$this->removeCachedFile($path);
- return fwrite($handle, $data);
+ $count = fwrite($handle, $data);
+ fclose($handle);
+ return $count;
}
public function rename($path1, $path2) {