Miscellaneous cleanup, mostly undefined variables - part2 (#14445)

* Miscellaneous cleanup, mostly undefined variables - part2

* wip

* Update Number.php

* Update BridgeMib.php

* Update Xdsl.php

* Update cisco.inc.php

* Update Cisco.php

* Update entity-sensor.inc.php

* Update entity-sensor.inc.php

* Update entity-sensor.inc.php

* Update avtech.inc.php

* Update functions.inc.php

* Update HostResources.php

* Update ports.inc.php

* Update route.inc.php

* Update cisco.inc.php

* Update Cisco.php
This commit is contained in:
Jellyfrog
2022-10-18 13:30:42 +02:00
committed by GitHub
parent 1c9234adf1
commit 34a58c3f9f
21 changed files with 98 additions and 87 deletions

View File

@@ -591,8 +591,8 @@ foreach ($ports as $port) {
// rewrite the ifPhysAddress
if (strpos($this_port['ifPhysAddress'] ?? '', ':')) {
[$a_a, $a_b, $a_c, $a_d, $a_e, $a_f] = explode(':', $this_port['ifPhysAddress']);
$this_port['ifPhysAddress'] = zeropad($a_a) . zeropad($a_b) . zeropad($a_c) . zeropad($a_d) . zeropad($a_e) . zeropad($a_f);
$mac_split = explode(':', $this_port['ifPhysAddress']);
$this_port['ifPhysAddress'] = zeropad($mac_split[0]) . zeropad($mac_split[1]) . zeropad($mac_split[2]) . zeropad($mac_split[3]) . zeropad($mac_split[4] ?? '') . zeropad($mac_split[5] ?? '');
}
// use HC values if they are available