mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
autodiscovery fix (#14213)
* autodiscovery fix * much simpler approach * murrant suggestion * Simplify even more * Use nullable operator Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -41,9 +41,10 @@ function cleanPort($interface, $device = null)
|
||||
if (! $interface) {
|
||||
return $interface;
|
||||
}
|
||||
$interface['ifAlias'] = htmlentities($interface['ifAlias']);
|
||||
$interface['ifName'] = htmlentities($interface['ifName']);
|
||||
$interface['ifDescr'] = htmlentities($interface['ifDescr']);
|
||||
|
||||
$interface['ifAlias'] = htmlentities($interface['ifAlias'] ?? '');
|
||||
$interface['ifName'] = htmlentities($interface['ifName'] ?? '');
|
||||
$interface['ifDescr'] = htmlentities($interface['ifDescr'] ?? '');
|
||||
|
||||
if (! $device) {
|
||||
$device = device_by_id_cache($interface['device_id']);
|
||||
|
Reference in New Issue
Block a user