From 1027b1c75b61fc62637627aac72a75c5aa15c014 Mon Sep 17 00:00:00 2001 From: stan Date: Sun, 6 Feb 2011 15:28:49 +0000 Subject: [PATCH] Prevented memory exhaustion in timeline view for very long events git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3277 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/skins/classic/views/timeline.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/timeline.php b/web/skins/classic/views/timeline.php index b264058ce..d137b8bfd 100644 --- a/web/skins/classic/views/timeline.php +++ b/web/skins/classic/views/timeline.php @@ -408,7 +408,8 @@ foreach( dbFetchAll( $eventsSql ) as $event ) else { $framesSql = "select FrameId,Delta,unix_timestamp(TimeStamp) as TimeT,Score from Frames where EventId = '".$event['Id']."' and Score > 0"; - foreach( dbFetchAll( $framesSql ) as $frame ) + $result = dbQuery( $framesSql ); + while( $frame = dbFetchNext( $result ) ) { if ( $frame['Score'] == 0 ) continue;