minor fixes

Former-commit-id: 51a2308e80a85c5a099410c5883c9b389d3a74ab
This commit is contained in:
fbsanchez 2019-02-27 13:56:06 +01:00
parent ec5c9d7c27
commit f979af0735
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ sub new {
$self->{'snmp_security_level'} = '';
# Disable SNMP scans if no community was given.
if (scalar(@{$self->{'communities'}}) == 0) {
if (ref($self->{'communities'}) ne "ARRAY" || scalar(@{$self->{'communities'}}) == 0) {
$self->{'snmp_enabled'} = 0;
$self->call('message', "There is not any SNMP community configured.", 5);