Skip to content

Commit 4c67fe8

Browse files
Merge pull request #52164 from nextcloud/backport/52135/stable29
[stable29] ignore missing theming app
2 parents 0fdc1cc + 958a614 commit 4c67fe8

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)