Browse Source

Merge pull request #26494 from rigrig/fix-php8-deprecations

Fix some php 8 warnings
tags/v22.0.0beta4
Morris Jobke 3 years ago
parent
commit
2ae60b42ab
No account linked to committer's email address

+ 1
- 1
apps/files/lib/Helper.php View File

@@ -216,7 +216,7 @@ class Helper {
* @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];

+ 2
- 2
core/Controller/PreviewController.php View File

@@ -155,8 +155,8 @@ class PreviewController extends Controller {
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);

+ 1
- 1
lib/private/Files/Config/CachedMountFileInfo.php View File

@@ -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;
}

+ 6
- 2
lib/private/Files/View.php View File

@@ -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

+ 1
- 1
lib/public/AppFramework/Http/Template/PublicTemplateResponse.php View File

@@ -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();
});
}


Loading…
Cancel
Save