mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
DirectorObjectForm: do not set null defaults
This commit is contained in:
parent
5fa8dac9f5
commit
ce7b6031ff
@ -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…
x
Reference in New Issue
Block a user