// will also set the $SESSION->cal_courses_shown variable to that one course. Otherwise, we 'd need to add extra
// arguments to this function.
- $courses = array_diff($courses, array(1));
- if(count($courses) == 1) {
- $morehref = '&course='.reset($courses);
- }
- else {
- $morehref = '';
+ $morehref = '';
+ if(!empty($courses)) {
+ $courses = array_diff($courses, array(1));
+ if(count($courses) == 1) {
+ $morehref = '&course='.reset($courses);
+ }
}
// We want to have easy access by day, since the display is on a per-day basis.
// will also set the $SESSION->cal_courses_shown variable to that one course. Otherwise, we 'd need to add extra
// arguments to this function.
- $courses = array_diff($courses, array(1));
- if(count($courses) == 1) {
- $morehref = '&course='.reset($courses);
- }
- else {
- $morehref = '';
+ $morehref = '';
+ if(!empty($courses)) {
+ $courses = array_diff($courses, array(1));
+ if(count($courses) == 1) {
+ $morehref = '&course='.reset($courses);
+ }
}
if($events !== false) {