From 46a3b18dd1c235528163fb67d33b8cc90415ab62 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Fri, 11 Apr 2025 17:03:21 -0100 Subject: [PATCH] fix(setup): ignore missing theming app Signed-off-by: Maxence Lange --- lib/private/TemplateLayout.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 9bb12c804d7..42d5bc2200e 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -180,8 +180,12 @@ class TemplateLayout extends \OC_Template { } // Set body data-theme - $themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class); - $this->assign('enabledThemes', $themesService->getEnabledThemes()); + try { + $themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class); + } catch (\OCP\AppFramework\QueryException) { + $themesService = null; + } + $this->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []); // Send the language, locale, and direction to our layouts $lang = \OC::$server->get(IFactory::class)->findLanguage();