fix save settings

This commit is contained in:
Jean-Christian Denis 2023-05-30 00:23:23 +02:00
parent a1f4d08e26
commit 0107bbb72f
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -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(