Resolved a pair of errors caused by undefined variables

This commit is contained in:
Alejandro Gallardo Escobar 2015-05-19 16:04:35 +02:00
parent 7e67287ee0
commit 60c486c62f
1 changed files with 2 additions and 2 deletions

View File

@ -2956,7 +2956,7 @@ sub pandora_update_module_on_error ($$$) {
# Set tagente_estado.current_interval to make sure it is not 0
my $current_interval;
if ($module->{'cron_interval'} ne '' && $module->{'cron_interval'} ne '* * * * *') {
if (defined($module->{'cron_interval'}) && $module->{'cron_interval'} ne '' && $module->{'cron_interval'} ne '* * * * *') {
$current_interval = cron_next_execution ($module->{'cron_interval'});
}
elsif ($module->{'module_interval'} == 0) {
@ -4998,7 +4998,7 @@ sub pandora_output_password($$) {
my ($pa_config, $password) = @_;
# Do not attemp to decrypt empty passwords.
return '' if ($password eq '');
return '' if (! defined($password) || $password eq '');
# Encryption disabled.
return $password if (! defined($pa_config->{'encryption_key'}) || $pa_config->{'encryption_key'} eq '');