From: stronk7 Date: Sat, 10 Apr 2004 22:24:23 +0000 (+0000) Subject: Avoid one warning where $content and $list were empty. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5fef34d7a92c412175ea93f8c3c679c5ce206a5e;p=moodle.git Avoid one warning where $content and $list were empty. --- diff --git a/course/lib.php b/course/lib.php index 525c7e4fc0..d70f247825 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1013,13 +1013,15 @@ function print_side_block($heading="", $content="", $list=NULL, $icons=NULL, $fo echo "$content"; } else { echo ""; - foreach ($list as $key => $string) { - echo "cellcontent2\">"; - if ($icons) { - echo ""; + if ($list) { + foreach ($list as $key => $string) { + echo "cellcontent2\">"; + if ($icons) { + echo ""; + } + echo ""; + echo ""; } - echo ""; - echo ""; } if ($footer) { echo "cellcontent2\">";
".$icons[$key]."
".$icons[$key]."$string
$string