mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix Undefined variable/key warnings (#14134)
* Fix Undefined variable/key warnings * massage for test data * restore set_numeric, only generates noise * Fix ucd storage used (apparently free is not stored in discovery...)
This commit is contained in:
@@ -49,7 +49,6 @@ foreach ($device['vlans'] as $domain_id => $vlans) {
|
||||
|
||||
foreach ((array) $vlan_data as $ifIndex => $vlan_port) {
|
||||
$port = get_port_by_index_cache($device['device_id'], $ifIndex);
|
||||
echo str_pad($vlan_port_id, 10) . str_pad($ifIndex, 10) . str_pad($port['ifDescr'], 25) . str_pad($vlan_port['dot1dStpPortPriority'], 10) . str_pad($vlan_port['dot1dStpPortState'], 15) . str_pad($vlan_port['dot1dStpPortPathCost'], 10);
|
||||
|
||||
$db_w = [
|
||||
'device_id' => $device['device_id'],
|
||||
@@ -63,6 +62,8 @@ foreach ($device['vlans'] as $domain_id => $vlans) {
|
||||
$db_a['cost'] = isset($vlan_port['dot1dStpPortPathCost']) ? $vlan_port['dot1dStpPortPathCost'] : 0;
|
||||
$db_a['untagged'] = isset($vlan_port['untagged']) ? $vlan_port['untagged'] : 0;
|
||||
|
||||
echo str_pad($db_a['baseport'], 10) . str_pad($ifIndex, 10) . str_pad($port['ifName'] ?: $port['ifDescr'], 25) . str_pad($db_a['priority'], 10) . str_pad($db_a['state'], 15) . str_pad($db_a['cost'], 10);
|
||||
|
||||
$from_db = dbFetchRow('SELECT * FROM `ports_vlans` WHERE device_id = ? AND port_id = ? AND `vlan` = ?', [$device['device_id'], $port['port_id'], $vlan_id]);
|
||||
|
||||
if ($from_db['port_vlan_id']) {
|
||||
|
Reference in New Issue
Block a user