Fix: Settings not saving. Fixes issue #773
This commit is contained in:
parent
1d2e2ebdc7
commit
3b893e7ccf
1 changed files with 3 additions and 1 deletions
|
@ -109,7 +109,7 @@ class SettingsController extends Controller
|
|||
$settingsClass = new $settings_class();
|
||||
|
||||
foreach ($settingsClass->toArray() as $key => $value) {
|
||||
switch (gettype($value)) {
|
||||
switch (gettype($request->input($key))) {
|
||||
case 'boolean':
|
||||
$settingsClass->$key = $request->has($key);
|
||||
break;
|
||||
|
@ -125,6 +125,8 @@ class SettingsController extends Controller
|
|||
case 'double':
|
||||
$settingsClass->$key = $request->input($key) ?? 0.0;
|
||||
break;
|
||||
default:
|
||||
$settingsClass->$key = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue