Merge pull request #52135 from nextcloud/fix/52131/ignore-missing-themes-31

[stable31] ignore missing theming app
pull/51979/head
Maxence Lange 2025-04-12 16:24:02 +07:00 committed by GitHub
commit cc988dff85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

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