From 1a85e282e2ff51bfcf567eea65de2349f39c3bc1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 29 Nov 2018 10:09:49 -0500 Subject: [PATCH] use find_one instead of new. We seem to be comparing against unfound event objects --- scripts/zmaudit.pl.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 6a1d8554f..c373c2a04 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -592,8 +592,8 @@ EVENT: while ( my ( $db_event, $age ) = each( %$db_events ) ) { } # end if exists in filesystem } else { Debug("Found fs event for id $db_event, $age seconds old at " . $$fs_events{$db_event}->Path()); - my $Event = new ZoneMinder::Event( $db_event ); - if ( ! $Event->check_for_in_filesystem() ) { + my $Event = ZoneMinder::Event->find_one( Id=>$db_event ); + if ( $Event and ! $Event->check_for_in_filesystem() ) { Warning("Not found at " . $Event->Path() . ' was found at ' . $$fs_events{$db_event}->Path() ); Warning($Event->to_string()); Warning($$fs_events{$db_event}->to_string());