From 30b437542dec253fd300f07fe771f6ce9ab85e70 Mon Sep 17 00:00:00 2001 From: discomrade <83621080+discomrade@users.noreply.github.com> Date: Wed, 17 Jul 2024 01:30:14 +0000 Subject: [PATCH] [setup] allow setting bool option to false if default is true --- ext/setup/main.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/setup/main.php b/ext/setup/main.php index 5ccb0d4e..19dd2fd1 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -406,7 +406,12 @@ class Setup extends Extension break; } } else { - $config->delete($name); + // browsers don't send empty checkboxes, false value must be stored in case default is true + if ($type == "bool") { + $config->set_bool($name, false); + } else { + $config->delete($name); + } } } }