diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index f3034a3e07..432b09cfee 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -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);