From ae4a9dc32457f544ebb8ea39bc3095994e00869e Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 25 Jun 2019 15:33:19 +0200 Subject: [PATCH] Fixed uninitialized value in pattern match --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index ee66b5ca68..2020abd5d4 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3866,7 +3866,7 @@ sub subst_alert_macros ($$;$$$$) { my $macro_regexp = join('|', keys %{$macros}); my $subst_func; - if ($string =~ m/^(?:(")(?:.*)"|(')(?:.*)')$/) { + if (defined($string) && $string =~ m/^(?:(")(?:.*)"|(')(?:.*)')$/) { my $quote = $1 ? $1 : $2; $subst_func = sub { my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module);