SnmpQuery Handle empty oids in get more gracefully (#14577)

This commit is contained in:
Tony Murray
2022-11-05 00:38:20 -05:00
committed by GitHub
parent 78d6ed49ee
commit e5e169358f

View File

@@ -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));
}