From 5fef34d7a92c412175ea93f8c3c679c5ce206a5e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 10 Apr 2004 22:24:23 +0000 Subject: [PATCH] Avoid one warning where $content and $list were empty. --- course/lib.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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\">"; -- 2.39.5
".$icons[$key]."
".$icons[$key]."$string
$string