From 3cac54b955e53ff8d12fcdd31410a3d5d462e0ac Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 23 Jul 2018 16:38:33 +0200 Subject: [PATCH] Don't call getUID on null when the app is loaded for a guest Signed-off-by: Joas Schilling --- apps/files_sharing/appinfo/app.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 567b1a16ba..13705718a0 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -96,7 +96,11 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { ]); // show_Quick_Access stored as string - $defaultExpandedState = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_sharing_menu', '0') === '1'; + $user = $userSession->getUser(); + $defaultExpandedState = true; + if ($user instanceof \OCP\IUser) { + $defaultExpandedState = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_sharing_menu', '0') === '1'; + } \OCA\Files\App::getNavigationManager()->add([ 'id' => 'shareoverview',