Fix Undefined array key "enabledThemes" on layout.user.php

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ 2022-04-28 08:54:57 +02:00
parent 971e224ce4
commit 05d743570a
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -107,6 +107,7 @@ class TemplateLayout extends \OC_Template {
Util::addScript('core', 'unified-search', 'core');
// Set body data-theme
$this->assign('enabledThemes', []);
if (\OC::$server->getAppManager()->isEnabledForUser('theming') && class_exists('\OCA\Theming\Service\ThemesService')) {
/** @var \OCA\Theming\Service\ThemesService */
$themesService = \OC::$server->get(\OCA\Theming\Service\ThemesService::class);