Fixed uninitialized value in pattern match

This commit is contained in:
Daniel Maya 2019-06-25 15:33:19 +02:00
parent 10aa0631af
commit ae4a9dc324
1 changed files with 1 additions and 1 deletions

View File

@ -3866,7 +3866,7 @@ sub subst_alert_macros ($$;$$$$) {
my $macro_regexp = join('|', keys %{$macros}); my $macro_regexp = join('|', keys %{$macros});
my $subst_func; my $subst_func;
if ($string =~ m/^(?:(")(?:.*)"|(')(?:.*)')$/) { if (defined($string) && $string =~ m/^(?:(")(?:.*)"|(')(?:.*)')$/) {
my $quote = $1 ? $1 : $2; my $quote = $1 ? $1 : $2;
$subst_func = sub { $subst_func = sub {
my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module); my $macro = on_demand_macro($pa_config, $dbh, shift, $macros, $agent, $module);