mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
Fix links to non-existent devices (#12680)
Was throwing an exception before instead of returning an empty string
This commit is contained in:
parent
10cf97e581
commit
f84591a1c7
@ -47,7 +47,7 @@ class Url
|
||||
*/
|
||||
public static function deviceLink($device, $text = null, $vars = [], $start = 0, $end = 0, $escape_text = 1, $overlib = 1)
|
||||
{
|
||||
if (is_null($device)) {
|
||||
if (! $device instanceof Device || ! $device->hostname) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user