Merge pull request #52164 from nextcloud/backport/52135/stable29

[stable29] ignore missing theming app
This commit is contained in:
Andy Scherzinger 2025-04-14 13:05:51 +02:00 committed by GitHub
commit 4c67fe8521
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,8 +212,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();