From 75adf40c3d52b023e9b76b7674ea8c0c5072a99b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 4 Sep 2023 11:43:43 +0200 Subject: [PATCH] fix crash on theme preview --- src/Frontend.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Frontend.php b/src/Frontend.php index d1e5e8a..6160683 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -72,6 +72,10 @@ class Frontend extends Process public static function switchTheme(string $theme): void { + if (dcCore::app()->blog->settings->get('system')->get('theme') == $theme) { + return; + } + if (My::settings()->get('mt_exclude')) { if (in_array($theme, explode('/', My::settings()->get('mt_exclude')))) { return;