From 2aacbf790af051c95a804603bddec0cabd169c82 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 21 Dec 2021 20:24:28 -0500 Subject: [PATCH] handle warning due to not defined last_run --- scripts/zmfilter.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index c0cdf7235..960c090cb 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -184,7 +184,7 @@ while (!$zm_terminate) { foreach my $filter (@filters) { last if $zm_terminate; - my $elapsed = ($now - $$filter{last_ran}); + my $elapsed = ($now - ($$filter{last_ran} ? $$filter{last_ran} : 0)); if ($$filter{last_ran} and ($elapsed < $$filter{ExecuteInterval})) { my $filter_delay = $$filter{ExecuteInterval} - ($now - $$filter{last_ran}); $delay = $filter_delay if $filter_delay < $delay;