Skip to content

Commit 9b9bd3a

Browse files
Merge pull request #52165 from nextcloud/backport/52135/stable30
[stable30] ignore missing theming app
2 parents ced8e25 + 20ed42a commit 9b9bd3a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/private/TemplateLayout.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,12 @@ public function __construct($renderAs, $appId = '') {
180180
}
181181

182182
// Set body data-theme
183-
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
184-
$this->assign('enabledThemes', $themesService->getEnabledThemes());
183+
try {
184+
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
185+
} catch (\OCP\AppFramework\QueryException) {
186+
$themesService = null;
187+
}
188+
$this->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []);
185189

186190
// Send the language, locale, and direction to our layouts
187191
$lang = \OC::$server->get(IFactory::class)->findLanguage();

0 commit comments

Comments
 (0)