From bb73f02b80a3b8ff2522f6dc65df942478252680 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 14 Nov 2024 14:28:09 +1300 Subject: [PATCH] FIX Ensure themelist is not null --- src/Extensions/SiteTreeSubsites.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Extensions/SiteTreeSubsites.php b/src/Extensions/SiteTreeSubsites.php index b03f920a..e9c730e9 100644 --- a/src/Extensions/SiteTreeSubsites.php +++ b/src/Extensions/SiteTreeSubsites.php @@ -402,7 +402,10 @@ public static function contentcontrollerInit($controller) $subsite = Subsite::currentSubsite(); if ($subsite && $subsite->Theme) { - SSViewer::set_themes(ThemeResolver::singleton()->getThemeList($subsite)); + $themeList = ThemeResolver::singleton()->getThemeList($subsite); + if (!is_null($themeList)) { + SSViewer::set_themes($themeList); + } } $ignore_subsite_locale = Config::inst()->get(SiteTreeSubsites::class, 'ignore_subsite_locale');