Skip to content

Commit 560f44d

Browse files
authored
Merge pull request #18933 from nextcloud/backport/18107/stable16
[stable16] dont throw undefined index errors for storages that have no owner set
2 parents e2a5411 + 1671bd4 commit 560f44d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/files/lib/Controller/ViewController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
269269

270270
$params = [];
271271
$params['usedSpacePercent'] = (int) $storageInfo['relative'];
272-
$params['owner'] = $storageInfo['owner'];
273-
$params['ownerDisplayName'] = $storageInfo['ownerDisplayName'];
272+
$params['owner'] = $storageInfo['owner'] ?? '';
273+
$params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? '';
274274
$params['isPublic'] = false;
275275
$params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
276276
$params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name');

0 commit comments

Comments
 (0)