Merge pull request #18933 from nextcloud/backport/18107/stable16

[stable16] dont throw undefined index errors for storages that have no owner set
This commit is contained in:
Roeland Jago Douma 2020-01-20 21:59:09 +01:00 committed by GitHub
commit 560f44dafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ class ViewController extends Controller {
$params = [];
$params['usedSpacePercent'] = (int) $storageInfo['relative'];
$params['owner'] = $storageInfo['owner'];
$params['ownerDisplayName'] = $storageInfo['ownerDisplayName'];
$params['owner'] = $storageInfo['owner'] ?? '';
$params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? '';
$params['isPublic'] = false;
$params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
$params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name');