From 36ec1316336da2c2f32e160d52c2915fb3130bad Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 27 Mar 2015 19:54:03 +0000 Subject: [PATCH] Fixed the issue with ports constantly logging descr changes --- includes/polling/ports.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index ddb7fe3667..183381945d 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -277,8 +277,15 @@ foreach ($ports as $port) $attrib_key = "port_descr_".$attrib; if ($port_ifAlias[$attrib] != $port[$attrib_key]) { + if (!isset($port_ifAlias[$attrib])) { + $port_ifAlias[$attrib] = array('NULL'); + $log_port = 'NULL'; + } else { + $log_port = $port_ifAlias[$attrib]; + } $port['update'][$attrib_key] = $port_ifAlias[$attrib]; - log_event($attrib . ": ".$port[$attrib_key]." -> " . $port_ifAlias[$attrib], $device, 'interface', $port['port_id']); + log_event($attrib . ": ".$port[$attrib_key]." -> " . $log_port, $device, 'interface', $port['port_id']); + unset($log_port); } } }