IcingaServiceForm: check for null

This commit is contained in:
Thomas Gelf 2022-04-04 19:40:42 +02:00
parent 93d0afff10
commit d92a5e846b
1 changed files with 1 additions and 1 deletions

View File

@ -783,7 +783,7 @@ class IcingaServiceForm extends DirectorObjectForm
{
if ($this->hasBeenSent()) {
$name = $this->getSentOrObjectValue('object_name');
if (!strlen($name)) {
if ($name === null || !strlen($name)) {
$this->setElementValue('object_name', end($imports));
$this->object->set('object_name', end($imports));
}