mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
SnmpQuery Handle empty oids in get more gracefully (#14577)
This commit is contained in:
@@ -248,6 +248,10 @@ class NetSnmpQuery implements SnmpQueryInterface
|
||||
*/
|
||||
public function get($oid): SnmpResponse
|
||||
{
|
||||
if (empty($oid)) {
|
||||
return new SnmpResponse('');
|
||||
}
|
||||
|
||||
return $this->exec('snmpget', $this->parseOid($oid));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user