- foreach ($SESSIONS as $session) {
- if($session['id'] <= $SESSIONS_next) { $SESSIONS_totex_nextinc += $session['nexamples']; }
+ if(isset($SESSIONS)) {
+ foreach ($SESSIONS as $session) {
+ if( (! isset($SESSIONS_next)) || $session['id'] < $SESSIONS_next ) { $SESSIONS_totex += $session['nexamples']; }
+ if( (! isset($SESSIONS_actual)) || $session['id'] != $SESSIONS_actual ) { $SESSIONS_last = $session['id']; }
+ if( (! isset($SESSIONS_next)) || $session['id'] <= $SESSIONS_next ) { $SESSIONS_totex_nextinc += $session['nexamples']; }
+ }