From c6d8a026498e8392fd516df8cd403164dc87bf54 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 15 Apr 2007 21:08:08 +0000 Subject: [PATCH] fixed warning --- calendar/lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/calendar/lib.php b/calendar/lib.php index 0ab3790eb42..2e9a6ac98db 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1110,8 +1110,10 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU } //BUG 6130 clean $courses array as SESSION has bad entries. // [pj] TODO: See if this has to do with my new change in get_default_courses and can be taken out - foreach ($courses as $index => $value) { - if (empty($value)) unset($courses[$index]); + if (is_array($courses)) { + foreach ($courses as $index => $value) { + if (empty($value)) unset($courses[$index]); + } } if($SESSION->cal_show_user || $ignorefilters) {