Skip to content

Commit ad4ce9c

Browse files
authored
Handle orphaned ports in port search (librenms#17037)
1 parent e460492 commit ad4ce9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/Ajax/PortSearchController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function formatItem($port): array
6969
'name' => $label,
7070
'description' => $description,
7171
'colours' => Color::forPortStatus($port),
72-
'hostname' => $port->device->displayName(),
72+
'hostname' => $port->device?->displayName(),
7373
'port_id' => $port->port_id,
7474
];
7575
}

0 commit comments

Comments
 (0)