summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Local.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2017-01-12 16:07:41 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-01-27 12:20:48 -0600
commit6fd7d4efd0329058bd51c5fa038b2df7188b57b2 (patch)
treedcaef8ae5173efac7be34f21eb0a0ba03583345e /lib/private/Files/Storage/Local.php
parent05884bcd7c80ddd84b945ba6917bdf4a16532b52 (diff)
downloadnextcloud-server-6fd7d4efd0329058bd51c5fa038b2df7188b57b2.tar.gz
nextcloud-server-6fd7d4efd0329058bd51c5fa038b2df7188b57b2.zip
remove obsolete hack (#26928)
* remove obsolete hack > // file_get_contents() has a memory leak: https://bugs.php.net/bug.php?id=61961 was closed 4 years ago. we could also use the Common implementation Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Files/Storage/Local.php')
-rw-r--r--lib/private/Files/Storage/Local.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 4fe7dcafbbf..80d48680be1 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -205,18 +205,7 @@ class Local extends \OC\Files\Storage\Common {
}
public function file_get_contents($path) {
- // file_get_contents() has a memory leak: https://bugs.php.net/bug.php?id=61961
- $fileName = $this->getSourcePath($path);
-
- $fileSize = filesize($fileName);
- if ($fileSize === 0) {
- return '';
- }
-
- $handle = fopen($fileName, 'rb');
- $content = fread($handle, $fileSize);
- fclose($handle);
- return $content;
+ return file_get_contents($this->getSourcePath($path));
}
public function file_put_contents($path, $data) {