From 0107bbb72f7621aeb5ad0de6fb3403eb433a402c Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 30 May 2023 00:23:23 +0200 Subject: [PATCH] fix save settings --- src/Config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Config.php b/src/Config.php index 67ac9b6..a7a7a8b 100644 --- a/src/Config.php +++ b/src/Config.php @@ -55,7 +55,11 @@ class Config extends dcNsProcess # -- Set settings -- try { foreach ($s->listSettings() as $key => $value) { - $s->writeSetting($key, $_POST[$key] ?? $value); + if (is_bool($value)) { + $s->writeSetting($key, !empty($_POST[$key])); + } else { + $s->writeSetting($key, $_POST[$key] ?? $value); + } } dcPage::addSuccessNotice(