fix settings write

This commit is contained in:
Jean-Christian Paul Denis 2023-04-29 01:51:12 +02:00
parent 40c3981b86
commit f2baa97680
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
2 changed files with 3 additions and 3 deletions

View File

@ -56,8 +56,8 @@ class Config extends dcNsProcess
$s = new 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(

View File

@ -119,6 +119,6 @@ class Settings
*/
public function listSettings(): array
{
return array_keys(get_class_vars(Settings::class));
return get_object_vars($this);
}
}