fix empty selection
This commit is contained in:
parent
2b6ee4cbba
commit
40fccc7434
1 changed files with 3 additions and 1 deletions
|
@ -60,7 +60,9 @@ class Config extends Process
|
|||
|
||||
// write settings
|
||||
foreach ($s->dump() as $key => $value) {
|
||||
if (is_bool($value)) {
|
||||
if (is_array($value) && empty($_POST[My::id() . $key])) {
|
||||
$s->set($key, []);
|
||||
} elseif (is_bool($value)) {
|
||||
$s->set($key, !empty($_POST[My::id() . $key]));
|
||||
} else {
|
||||
$s->set($key, $_POST[My::id() . $key] ?: $value);
|
||||
|
|
Loading…
Reference in a new issue