diff --git a/lib/Activity/CospendProvider.php b/lib/Activity/CospendProvider.php index 24d1d5648..90a60f5c1 100644 --- a/lib/Activity/CospendProvider.php +++ b/lib/Activity/CospendProvider.php @@ -81,7 +81,10 @@ public function __construct(IURLGenerator $urlGenerator, $this->config = $config; $this->groupManager = $groupManager; $this->appManager = $appManager; - $this->projectNames = $projectService->getProjectNames($userId); + $this->projectNames = []; + if (!is_null($userId)) { + $this->projectNames = $projectService->getProjectNames($userId); + } } /**