unset the ref so that last monitor isn't duplicated

This commit is contained in:
Isaac Connor 2017-11-02 07:59:25 -04:00
parent ca758a6099
commit 5aa61cf1f5
1 changed files with 2 additions and 1 deletions

View File

@ -122,10 +122,11 @@ for ( $i = 0; $i < count($displayMonitors); $i++ ) {
$sql = 'SELECT '.join($counts,', ').' FROM Events as E where MonitorId = ?'; $sql = 'SELECT '.join($counts,', ').' FROM Events as E where MonitorId = ?';
$counts = dbFetchOne( $sql, NULL, array($monitor['Id']) ); $counts = dbFetchOne( $sql, NULL, array($monitor['Id']) );
if ( $counts ) if ( $counts )
$displayMonitors[$i] = $monitor = array_merge( $monitor, $counts ); $monitor = array_merge( $monitor, $counts );
for ( $j = 0; $j < count($eventCounts); $j += 1 ) { for ( $j = 0; $j < count($eventCounts); $j += 1 ) {
$eventCounts[$j]['total'] += $monitor['EventCount'.$j]; $eventCounts[$j]['total'] += $monitor['EventCount'.$j];
} }
unset($monitor);
} }
$cycleWidth = $maxWidth; $cycleWidth = $maxWidth;
$cycleHeight = $maxHeight; $cycleHeight = $maxHeight;