Commit b51da5a4 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer Committed by Vincent Petry
Browse files

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

* jeeez
parent 7b2ef183
......@@ -203,18 +203,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment