From: skodak Date: Sun, 15 Apr 2007 21:09:05 +0000 (+0000) Subject: fixed warning; merged from MODOLE_18_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1384da1e88ac8d3afc3732f6bd089ec0869ac7e9;p=moodle.git fixed warning; merged from MODOLE_18_STABLE --- diff --git a/calendar/lib.php b/calendar/lib.php index 0ab3790eb4..2e9a6ac98d 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) {