Fix incorrect use of zmDbExecute causing emails to not be sent. Fixes #3800

pull/3804/head
Isaac Connor 2024-01-04 10:16:38 -05:00
parent 9024e5a479
commit 6f40293e93
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}