fix settings read/write
This commit is contained in:
parent
c809e2c6e0
commit
5ceeb79318
@ -55,8 +55,8 @@ class Config extends dcNsProcess
|
||||
|
||||
# -- Set settings --
|
||||
try {
|
||||
foreach ($s->listSettings() as $key) {
|
||||
$s->writeSetting($key, $_POST[$key] ?? '');
|
||||
foreach ($s->listSettings() as $key => $value) {
|
||||
$s->writeSetting($key, $_POST[$key] ?? $value);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
|
@ -91,6 +91,6 @@ class Settings
|
||||
*/
|
||||
public function listSettings(): array
|
||||
{
|
||||
return array_keys(get_class_vars(Settings::class));
|
||||
return get_object_vars($this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user