diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2025-04-14 10:53:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-14 10:53:38 +0200 |
commit | d385e024b9a09cc580432f372bf4ca7a7d6628d3 (patch) | |
tree | 4ab7b599276786ae0b334294bb5deccc1d254219 | |
parent | fc3067679dcaae2403123cfc913a2087eb856d1d (diff) | |
parent | 61ab5cf157263185b1c652f0e3a936814f7ab66b (diff) | |
download | nextcloud-server-d385e024b9a09cc580432f372bf4ca7a7d6628d3.tar.gz nextcloud-server-d385e024b9a09cc580432f372bf4ca7a7d6628d3.zip |
Merge pull request #52166 from nextcloud/upstream/52135/52135-master
-rw-r--r-- | lib/private/TemplateLayout.php | 9 |
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)) { |