Skip to content

Commit

Permalink
Fix functions taking optional parameters before required ones
Browse files Browse the repository at this point in the history
PHP 8 shows deprecation warnings about this, see #25806
Removes the "default" values, as they actually are required parameters anyway.

Signed-off-by: Richard de Boer <git@tubul.net>
  • Loading branch information
rigrig authored and backportbot[bot] committed Jun 7, 2021
1 parent a5bbd88 commit 7e9d459
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/files/lib/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,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];
Expand Down
4 changes: 2 additions & 2 deletions core/Controller/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,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);
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Config/CachedMountFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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;
}
Expand Down

0 comments on commit 7e9d459

Please sign in to comment.