Modified zmfilter.pl.in to fix #652, crashing while processing background filter with no terms

pull/653/head
Stephen Arthur 2015-01-03 12:45:18 -05:00
parent c4310f262c
commit 89a603cf27
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ sub getFilters
my $sql = "select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId";
$db_filter->{Sql} = '';
if ( @{$filter_expr->{terms}} )
if ( $filter_expr->{terms} )
{
for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ )
{