Fixed Perl Warning with undefined var
This commit is contained in:
parent
ba0e54aebb
commit
c176286a09
|
@ -344,6 +344,11 @@ sub pandora_evaluate_alert ($$$$$$$;$$$) {
|
|||
# '0001' means every year.
|
||||
my $date_every_year = sprintf("0001%02d%02d", $mon + 1, $mday);
|
||||
my $special_day = get_db_value ($dbh, 'SELECT same_day FROM talert_special_days WHERE (date = ? OR date = ?) AND (id_group = 0 OR id_group = ?) ORDER BY date DESC', $date, $date_every_year, $alert->{'id_group'});
|
||||
|
||||
if (!defined($special_day)) {
|
||||
$special_day = '';
|
||||
}
|
||||
|
||||
if ($special_day ne '') {
|
||||
logger ($pa_config, $date . " is a special day for " . $alert->{'name'} . ". (as a " . $special_day . ")", 10);
|
||||
return 1 if ($alert->{$special_day} != 1);
|
||||
|
|
Loading…
Reference in New Issue