Minor fixes

This commit is contained in:
fbsanchez 2019-11-18 19:32:57 +01:00
parent 8811095a3e
commit 83e7d5a701
2 changed files with 9 additions and 2 deletions

View File

@ -1531,7 +1531,7 @@ sub database_scan($$$) {
&& "$dbObjCfg->{'scan_databases'}" eq "1") {
# Skip database scan in Oracle tasks
next if $self->{'type'} == DISCOVERY_APP_ORACLE;
next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_ORACLE;
my $__data = $obj->scan_databases();

View File

@ -21,7 +21,6 @@ use warnings;
use Time::Local;
use POSIX qw(setsid strftime);
use POSIX;
use PandoraFMS::Sendmail;
use HTML::Entities;
use Encode;
use Socket qw(inet_ntoa inet_aton);
@ -31,6 +30,9 @@ use LWP::UserAgent;
use threads;
use threads::shared;
use lib '/usr/lib/perl5';
use PandoraFMS::Sendmail;
# New in 3.2. Used to sendmail internally, without external scripts
# use Module::Loaded;
@ -824,6 +826,11 @@ sub enterprise_hook ($$) {
# Try to call the function
my $output = eval { &$func (@args); };
# Discomment to debug.
# if ($@) {
# print STDERR $@;
# }
# Check for errors
#return undef if ($@);
return '' unless defined ($output);