VolatileStateResults: Properly handle missing host details

This commit is contained in:
Johannes Meyer 2024-04-09 11:48:42 +02:00
parent 29d7f4b3c7
commit 20212a0f87

View file

@ -131,7 +131,7 @@ class VolatileStateResults extends ResultSet
}
}
if ($type === 'service' && $row->host instanceof Host) {
if ($type === 'service' && $row->host instanceof Host && isset($row->host->id)) {
$hostStates[bin2hex($row->host->id)] = $row->host->state;
if (empty($hostStateKeys)) {
$hostStateKeys = $row->host->state->getColumns();