From 31df89f8827a6b1811946e3fb808d0b60f4ac6f0 Mon Sep 17 00:00:00 2001 From: trendschau Date: Tue, 30 Jan 2024 21:05:12 +0100 Subject: [PATCH] v2.1.2 fix error when change theme (string stored instead of array in themesettings/pluginsettings)) --- system/typemill/Controllers/ControllerApiSystemExtensions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/typemill/Controllers/ControllerApiSystemExtensions.php b/system/typemill/Controllers/ControllerApiSystemExtensions.php index c5eacf1..e8ef1cf 100644 --- a/system/typemill/Controllers/ControllerApiSystemExtensions.php +++ b/system/typemill/Controllers/ControllerApiSystemExtensions.php @@ -73,13 +73,13 @@ class ControllerApiSystemExtensions extends Controller if($params['type'] == 'plugins') { - $pluginsettings = $this->settings['plugins'][$params['name']] ?? $params['name']; + $pluginsettings = $this->settings['plugins'][$params['name']] ?? []; $pluginsettings['active'] = $params['checked']; $updatedSettings = $settings->updateSettings($pluginsettings, 'plugins', $params['name']); } elseif($params['type'] == 'themes') { - $themesettings = $this->settings['themes'][$params['name']] ?? $params['name']; + $themesettings = $this->settings['themes'][$params['name']] ?? []; $updatedSettings = $settings->updateSettings($themesettings, 'themes', $params['name']); if($updatedSettings) {