mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added controls for avoid undefined vars
This commit is contained in:
parent
b2ef0e3362
commit
ec5e505880
@ -2211,6 +2211,14 @@ sub snmp_get {
|
||||
return {
|
||||
'error' => "Only SNMP 1 2 2c and 3 are supported."
|
||||
};
|
||||
} elsif (!defined $snmp->{host}) {
|
||||
return {
|
||||
'error' => "Destination host must be defined."
|
||||
};
|
||||
} elsif (!defined $snmp->{oid}) {
|
||||
return {
|
||||
'error' => "OID must be defined"
|
||||
};
|
||||
} else {
|
||||
$snmp->{extra} = '' unless defined $snmp->{extra};
|
||||
$snmp->{context} = '' unless defined $snmp->{context};
|
||||
|
Loading…
x
Reference in New Issue
Block a user