fix(setup): ignore missing theming app

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2025-04-11 17:03:21 -01:00 committed by Andy Scherzinger
parent 291fb0d263
commit 20ed42a7d7

View file

@ -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();