diff --git a/booking.variety_admin.inc b/booking.variety_admin.inc index 15d971d..0699807 100644 --- a/booking.variety_admin.inc +++ b/booking.variety_admin.inc @@ -572,17 +572,18 @@ function booking_varietysessions_csv_report($timeslot_id) { $session_ids = drupal_json_decode($member->booking_variety_ids); //watchdog('booking_debug', 'booking_varietysessions_csv_report person session ids:
@info', array('@info' => print_r( $session_ids, true))); - //get the session id that matches our timeslot - $sid = $session_ids[$timeslot_id]; + //get the session id that matches our timeslot if it exists + if (isset($session_ids[$timeslot_id])) { + $sid = $session_ids[$timeslot_id]; - if (! isset($data[$sid])) { - $data[$sid] = array(); + if (! isset($data[$sid])) { + $data[$sid] = array(); + } + + //add the spaces and put this element in the right array + $text = array($member->booking_firstname, $member->booking_lastname); + $data[$sid][] = implode(' ', $text); } - $text = array($member->booking_firstname, $member->booking_lastname); - - //add the spaces and put this element in the right array - $data[$sid][] = implode(' ', $text); - } //watchdog('booking_debug', "
Study Group CSV Report\n@info", array('@info' => print_r( $data_array, true)));