From 6f40293e93283febffd4b2add7f4937c4c61ec1e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 4 Jan 2024 10:16:38 -0500 Subject: [PATCH] Fix incorrect use of zmDbExecute causing emails to not be sent. Fixes #3800 --- scripts/zmfilter.pl.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 7d207e65d..bc5a30330 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -666,10 +666,10 @@ sub substituteTags { my $max_alarm_score = 0; if ($need_images) { my $sql = 'SELECT * FROM `Frames` WHERE `EventId`=? AND `Type`=? ORDER BY `FrameId`'; - my $res = zmDbExecute($Event->{Id}, 'Alarm') or return; + my ($sth, $res) = zmDbExecute($sql, $Event->{Id}, 'Alarm') or return; my $rows = 0; - while ( my $frame = $res->fetchrow_hashref() ) { + while ( my $frame = $sth->fetchrow_hashref() ) { if ( !$first_alarm_frame ) { $first_alarm_frame = $frame; }