Merge pull request #18932 from nextcloud/backport/18107/stable17

[stable17] 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:30 +01:00 committed by GitHub
commit 997548cad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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