mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-06-08 16:24:21 -04:00
DirectorObjectForm: do not set null defaults
This commit is contained in:
parent
5fa8dac9f5
commit
ce7b6031ff
1 changed files with 8 additions and 0 deletions
|
|
@ -183,10 +183,18 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
unset($props['vars']);
|
||||
}
|
||||
|
||||
$null = array();
|
||||
foreach ($props as $k => $v) {
|
||||
if (is_bool($v)) {
|
||||
$props[$k] = $v ? 'y' : 'n';
|
||||
}
|
||||
if ($v === null) {
|
||||
$null[] = $k;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($null as $k) {
|
||||
unset($props[$k]);
|
||||
}
|
||||
|
||||
$this->setDefaults($props);
|
||||
|
|
|
|||
Loading…
Reference in a new issue