HostController: relax assertion

This commit is contained in:
Thomas Gelf 2023-06-13 17:39:15 +02:00
parent abbf580696
commit 8e60e0aab9

View File

@ -604,11 +604,13 @@ class HostController extends ObjectController
} }
/** /**
* @return IcingaHost * @return ?IcingaHost
*/ */
protected function getHostObject() protected function getHostObject()
{ {
assert($this->object instanceof IcingaHost); if ($this->object !== null) {
assert($this->object instanceof IcingaHost);
}
return $this->object; return $this->object;
} }
} }