mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix reference to non-existent variable
Use $port_id since $ports[$ifIndex]['port_id'] doesn't exist yet
This commit is contained in:
@@ -235,7 +235,7 @@ foreach ($port_stats as $ifIndex => $port) {
|
||||
if (!is_array($ports[$port['ifIndex']])) {
|
||||
$port_id = dbInsert(array('device_id' => $device['device_id'], 'ifIndex' => $ifIndex), 'ports');
|
||||
if ($config['enable_extended_port_metrics']) {
|
||||
dbInsert(array('port_id' => $ports[$ifIndex]['port_id']), 'ports_statistics');
|
||||
dbInsert(array('port_id' => $port_id), 'ports_statistics');
|
||||
}
|
||||
$ports[$port['ifIndex']] = dbFetchRow('SELECT * FROM `ports` WHERE `port_id` = ?', array($port_id));
|
||||
echo 'Adding: '.$port['ifName'].'('.$ifIndex.')('.$ports[$port['ifIndex']]['port_id'].')';
|
||||
|
Reference in New Issue
Block a user