From 0ba66a5de0e00eb82aa1cc99f92e4a789ed1922c Mon Sep 17 00:00:00 2001 From: danmarsden Date: Mon, 24 Jul 2006 00:15:54 +0000 Subject: [PATCH] Bug 6130 session has bad entries causes calendar to fail showing events Workaround untill Session is fixed properly. --- calendar/lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calendar/lib.php b/calendar/lib.php index bf077d10a6..88f87ea663 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1093,6 +1093,10 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU else { $courses = false; } + //BUG 6130 clean $courses array as SESSION has bad entries. + foreach ($courses as $index => $value) { + if (empty($value)) unset($courses[$index]); + } if($SESSION->cal_show_user || $ignorefilters) { // This doesn't work for arrays yet (maybe someday it will) -- 2.39.5