Every setting needs to have default

This commit is contained in:
slawkens
2023-08-04 15:47:32 +02:00
parent 18bb23d969
commit eca896954c
2 changed files with 4 additions and 8 deletions

View File

@@ -319,14 +319,6 @@ class Settings implements ArrayAccess
echo ($setting['desc'] ?? '');
echo '<br/>';
echo '<strong>Default:</strong> ';
if (empty($setting['default'])) {
if ($setting['type'] === 'boolean' && $setting['default'] !== false) {
$setting['default'] = true;
}
else {
$setting['default'] = '';
}
}
if ($setting['type'] === 'boolean') {
echo ($setting['default'] ? 'Yes' : 'No');