zmfilter.pl dies with Can't use an undefined value as an ARR
Posted: Fri Dec 31, 2010 11:09 am
My zmfilter.pl dies:
31.12.2010 12:06:21.059348 zmdc[29093].INF [Starting pending process, zmfilter.pl]
31.12.2010 12:06:21.061099 zmdc[29093].INF ['zmfilter.pl' starting at 10/12/31 12:06:21, pid = 29467]
==> /var/log/zoneminder/zmfilter.log <==
31.12.2010 12:06:22.099172 zmfilter[29467].INF [Scanning for events]
==> /var/log/zoneminder/zmdc.log <==
31.12.2010 12:06:27.148332 zmdc[29093].ERR ['zmfilter.pl ' exited abnormally, exit status 9]
I was able to strace zmfilter.pl process and this came up:
Can't use an undefined value as an ARRAY reference at /usr/bin/zmfilter.pl line 273
where
266 FILTER: while( my $db_filter = $sth->fetchrow_hashref() )
267 {
268 Debug( "Found filter '$db_filter->{Name}'\n" );
269 my $filter_expr = unserialize( $db_filter->{Query} );
270 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.Sta
rtTime) 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 where not isnull(E.EndTime)";
271 $db_filter->{Sql} = '';
272
273 if ( @{$filter_expr->{terms}} )
274 {
275 for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ )
any clues?
31.12.2010 12:06:21.059348 zmdc[29093].INF [Starting pending process, zmfilter.pl]
31.12.2010 12:06:21.061099 zmdc[29093].INF ['zmfilter.pl' starting at 10/12/31 12:06:21, pid = 29467]
==> /var/log/zoneminder/zmfilter.log <==
31.12.2010 12:06:22.099172 zmfilter[29467].INF [Scanning for events]
==> /var/log/zoneminder/zmdc.log <==
31.12.2010 12:06:27.148332 zmdc[29093].ERR ['zmfilter.pl ' exited abnormally, exit status 9]
I was able to strace zmfilter.pl process and this came up:
Can't use an undefined value as an ARRAY reference at /usr/bin/zmfilter.pl line 273
where
266 FILTER: while( my $db_filter = $sth->fetchrow_hashref() )
267 {
268 Debug( "Found filter '$db_filter->{Name}'\n" );
269 my $filter_expr = unserialize( $db_filter->{Query} );
270 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.Sta
rtTime) 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 where not isnull(E.EndTime)";
271 $db_filter->{Sql} = '';
272
273 if ( @{$filter_expr->{terms}} )
274 {
275 for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ )
any clues?