mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Miscellaneous fixes, mostly undefined variables (#14432)
* Miscellaneous fixes, mostly undefined variables * Update phpstan-baseline.neon
This commit is contained in:
@@ -44,7 +44,7 @@ class ThreeCom extends OS implements OSDiscovery
|
||||
|
||||
$device->hardware = str_replace('3Com ', '', $device->sysDescr);
|
||||
// Old Stack Units
|
||||
if (Str::startsWith($device->sysObjectID, '.1.3.6.1.4.1.43.10.27.4.1.')) {
|
||||
if (Str::startsWith($device->sysObjectID ?? '', '.1.3.6.1.4.1.43.10.27.4.1.')) {
|
||||
$oids = ['stackUnitDesc.1', 'stackUnitPromVersion.1', 'stackUnitSWVersion.1', 'stackUnitSerialNumber.1', 'stackUnitCapabilities.1'];
|
||||
$data = snmp_get_multi($this->getDeviceArray(), $oids, ['-OQUs', '--hexOutputLength=0'], 'A3COM0352-STACK-CONFIG');
|
||||
$device->hardware = trim($device->hardware . ' ' . ($data[1]['stackUnitDesc'] ?? ''));
|
||||
|
Reference in New Issue
Block a user