mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 01:04:09 +02:00
PreferenceForm: Fix Variable '$disabled' is probably undefined
- Remove obsolete `value` attribute
This commit is contained in:
parent
143347634f
commit
4d3765b22f
@ -215,6 +215,7 @@ class PreferenceForm extends Form
|
|||||||
$themeFile = StyleSheet::getThemeFile($formData['theme']);
|
$themeFile = StyleSheet::getThemeFile($formData['theme']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$disabled = [];
|
||||||
if ($themeFile !== null) {
|
if ($themeFile !== null) {
|
||||||
$file = @file_get_contents($themeFile);
|
$file = @file_get_contents($themeFile);
|
||||||
if ($file && strpos($file, StyleSheet::LIGHT_MODE_IDENTIFIER) === false) {
|
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')]
|
['src' => $this->getView()->href('img/theme-mode-thumbnail-system.svg')]
|
||||||
) . HtmlElement::create('span', [], $this->translate('System'))
|
) . HtmlElement::create('span', [], $this->translate('System'))
|
||||||
],
|
],
|
||||||
'value' => isset($value) ? $value : '',
|
'disable' => $disabled,
|
||||||
'disable' => isset($disabled) ? $disabled : [],
|
|
||||||
'escape' => false,
|
'escape' => false,
|
||||||
'decorators' => array_merge(
|
'decorators' => array_merge(
|
||||||
array_slice(self::$defaultElementDecorators, 0, -1),
|
array_slice(self::$defaultElementDecorators, 0, -1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user