check session still exists
This commit is contained in:
@@ -452,7 +452,7 @@ function booking_variety_sessions_view_summary() {
|
||||
array(':eid' => $event->eid));
|
||||
$sessions = $sessions_query->fetchAllAssoc('vid');
|
||||
|
||||
watchdog('booking_debug', "<pre>Variety Session Report sessions:\n@info</pre>", array('@info' => print_r( $sessions, true)));
|
||||
//watchdog('booking_debug', "<pre>Variety Session Report sessions:\n@info</pre>", array('@info' => print_r( $sessions, true)));
|
||||
|
||||
foreach ($timeslot_list as $timeslot) {
|
||||
$header[] = $timeslot->booking_variety_time_descrip;
|
||||
@@ -476,7 +476,14 @@ function booking_variety_sessions_view_summary() {
|
||||
'@nid' => $person->nid, '@tid' => $timeslot->tid, '@vid' => $vid,
|
||||
));
|
||||
|
||||
$text = $sessions[$vid]->booking_variety_descrip;
|
||||
// in case the person is somehow registered for a session that no longer exists
|
||||
if (isset($sessions[$vid])) {
|
||||
$text = $sessions[$vid]->booking_variety_descrip;
|
||||
}
|
||||
else {
|
||||
$text = "";
|
||||
}
|
||||
|
||||
$newline[] = $text;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user