summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-25 20:53:02 +0100
committerGitHub <noreply@github.com>2019-11-25 20:53:02 +0100
commita9fb5676210d2f7f45612f6b755badef78915e89 (patch)
treed580371fa40cd9ad796b08bcadd16c6f47dde7cb
parent9002b0f24524e672838339a9ea398ca6ec1a04fa (diff)
parentf2848fc17c98c15cfd90c31eed32ef741af83efb (diff)
downloadnextcloud-server-a9fb5676210d2f7f45612f6b755badef78915e89.tar.gz
nextcloud-server-a9fb5676210d2f7f45612f6b755badef78915e89.zip
Merge pull request #18107 from nextcloud/undefined-index-owner
dont throw undefined index errors for storages that have no owner set
-rw-r--r--apps/files/lib/Controller/ViewController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index a1c1e5e3530..1a6b3c532fb 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -275,8 +275,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');