Skip to content

Commit 958a614

Browse files
committed
fix(setup): ignore missing theming app
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 0fdc1cc commit 958a614

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
@@ -212,8 +212,12 @@ public function __construct($renderAs, $appId = '') {
212212
}
213213

214214
// Set body data-theme
215-
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
216-
$this->assign('enabledThemes', $themesService->getEnabledThemes());
215+
try {
216+
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
217+
} catch (\OCP\AppFramework\QueryException) {
218+
$themesService = null;
219+
}
220+
$this->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []);
217221

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

0 commit comments

Comments
 (0)