diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 67e2fbe8321dc..18fea3aa2a11f 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -216,7 +216,7 @@ public static function getFiles($dir, $sortAttribute = 'name', $sortDescending = * @param ITagManager $tagManager * @return array file list populated with tags */ - public static function populateTags(array $fileList, $fileIdentifier = 'fileid', ITagManager $tagManager) { + public static function populateTags(array $fileList, $fileIdentifier, ITagManager $tagManager) { $ids = []; foreach ($fileList as $fileData) { $ids[] = $fileData[$fileIdentifier]; diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index e1bfa01b238a6..1224ea39877b3 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -155,8 +155,8 @@ private function fetchPreview( Node $node, int $x, int $y, - bool $a = false, - bool $forceIcon = true, + bool $a, + bool $forceIcon, string $mode) : Http\Response { if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) { return new DataResponse([], Http::STATUS_NOT_FOUND); diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php index a179b9aef8bc8..7fdc26f7d5345 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 e11b9be9fed12..113290e2686fb 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -421,7 +421,9 @@ public function filesize($path) { */ 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 @@ public function readfile($path) { */ 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 70bec65b096dc..1196c90935dd0 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -96,7 +96,7 @@ public function setHeaderActions(array $actions) { $this->headerActions[] = $action; } usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { - return $a->getPriority() > $b->getPriority(); + return $a->getPriority() <=> $b->getPriority(); }); }