diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-06-07 23:30:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 23:30:59 +0200 |
commit | 2ae60b42ab87152d8b918aa289c974c42d267113 (patch) | |
tree | 71e87e066471b6e9e491470a60d666cce5771798 /lib | |
parent | ae4907b6c95b7ac5d36ef358048c7acafd517c07 (diff) | |
parent | 7990f95558ac2b7fac3b9f77dcbdc3c74b05785b (diff) | |
download | nextcloud-server-2ae60b42ab87152d8b918aa289c974c42d267113.tar.gz nextcloud-server-2ae60b42ab87152d8b918aa289c974c42d267113.zip |
Merge pull request #26494 from rigrig/fix-php8-deprecations
Fix some php 8 warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Config/CachedMountFileInfo.php | 2 | ||||
-rw-r--r-- | lib/private/Files/View.php | 8 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/Template/PublicTemplateResponse.php | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php index a179b9aef8b..7fdc26f7d53 100644 --- a/lib/private/Files/Config/CachedMountFileInfo.php +++ b/lib/private/Files/Config/CachedMountFileInfo.php @@ -30,7 +30,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf /** @var string */ private $internalPath; - public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '', $internalPath) { + public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath, $internalPath) { parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath); $this->internalPath = $internalPath; } 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 diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php index 70bec65b096..1196c90935d 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -96,7 +96,7 @@ class PublicTemplateResponse extends TemplateResponse { $this->headerActions[] = $action; } usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { - return $a->getPriority() > $b->getPriority(); + return $a->getPriority() <=> $b->getPriority(); }); } |