From 1671bd4ce085ffae17a243bda350827488e51b10 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 25 Nov 2019 15:17:15 +0100 Subject: [PATCH] dont throw undefined index errors for storages that have no owner set Signed-off-by: Robin Appelman --- apps/files/lib/Controller/ViewController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index cf1b4374da..0dba35e330 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -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');