Skip to content

Commit cc988df

Browse files
Merge pull request #52135 from nextcloud/fix/52131/ignore-missing-themes-31
[stable31] ignore missing theming app
2 parents d2055c6 + 46a3b18 commit cc988df

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)