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>
This commit is contained in:
Jörn Friedrich Dreyer 2017-01-12 16:07:41 +01:00 committed by Morris Jobke
parent 05884bcd7c
commit 6fd7d4efd0
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 1 additions and 12 deletions

View File

@ -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) {