Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-06-08 00:30:59 +0300
committerGitHub <noreply@github.com>2021-06-08 00:30:59 +0300
commit2ae60b42ab87152d8b918aa289c974c42d267113 (patch)
tree71e87e066471b6e9e491470a60d666cce5771798 /lib/private/Files/View.php
parentae4907b6c95b7ac5d36ef358048c7acafd517c07 (diff)
parent7990f95558ac2b7fac3b9f77dcbdc3c74b05785b (diff)
Merge pull request #26494 from rigrig/fix-php8-deprecations
Fix some php 8 warnings
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 e11b9be9fed..113290e2686 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -421,7 +421,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
@@ -445,7 +447,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