PreferenceForm: Fix `Variable '$disabled' is probably undefined`

- Remove obsolete `value` attribute
This commit is contained in:
Sukhwinder Dhillon 2023-08-15 15:34:37 +02:00 committed by raviks789
parent 143347634f
commit 4d3765b22f
1 changed files with 2 additions and 2 deletions

View File

@ -215,6 +215,7 @@ class PreferenceForm extends Form
$themeFile = StyleSheet::getThemeFile($formData['theme']);
}
$disabled = [];
if ($themeFile !== null) {
$file = @file_get_contents($themeFile);
if ($file && strpos($file, StyleSheet::LIGHT_MODE_IDENTIFIER) === false) {
@ -242,8 +243,7 @@ class PreferenceForm extends Form
['src' => $this->getView()->href('img/theme-mode-thumbnail-system.svg')]
) . HtmlElement::create('span', [], $this->translate('System'))
],
'value' => isset($value) ? $value : '',
'disable' => isset($disabled) ? $disabled : [],
'disable' => $disabled,
'escape' => false,
'decorators' => array_merge(
array_slice(self::$defaultElementDecorators, 0, -1),