aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/TemplateLayout.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index d9c02619943..374972ece22 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -198,8 +198,13 @@ class TemplateLayout {
$page->assign('direction', $direction);
// Set body data-theme
- $themesService = Server::get(\OCA\Theming\Service\ThemesService::class);
- $page->assign('enabledThemes', $themesService->getEnabledThemes());
+ try {
+ $themesService = Server::get(\OCA\Theming\Service\ThemesService::class);
+ } catch (\OCP\AppFramework\QueryException) {
+ $themesService = null;
+ }
+
+ $page->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []);
if ($this->config->getSystemValueBool('installed', false)) {
if (empty(self::$versionHash)) {