summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index a59f735c102..8f4b5db1167 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -422,7 +422,9 @@ class View {
*/
public function readfile($path) {
$this->assertPathLength($path);
- @ob_end_clean();
+ if (ob_get_level()) {
+ ob_end_clean();
+ }
$handle = $this->fopen($path, 'rb');
if ($handle) {
$chunkSize = 524288; // 512 kB chunks
@@ -446,7 +448,9 @@ class View {
*/
public function readfilePart($path, $from, $to) {
$this->assertPathLength($path);
- @ob_end_clean();
+ if (ob_get_level()) {
+ ob_end_clean();
+ }
$handle = $this->fopen($path, 'rb');
if ($handle) {
$chunkSize = 524288; // 512 kB chunks