if( isset($SESSIONS) ) {
foreach ($SESSIONS as $session) {
- if ($session['id'] == $SESSIONS_next) { break; }
+ if ( isset($SESSIONS_next) ) {
+ if ($session['id'] == $SESSIONS_next) { break; }
+ }
$exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM);