Merge pull request #52166 from nextcloud/upstream/52135/52135-master

pull/52153/head
Kate 2025-04-14 10:53:38 +07:00 committed by GitHub
commit d385e024b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

@ -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)) {