Small fix to avoid PHP warnings

This commit is contained in:
moodler
2003-03-21 04:49:29 +00:00
parent ef4145f6ae
commit f8430195d9
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -146,7 +146,10 @@
echo "<TD VALIGN=top $colormain WIDTH=\"100%\">";
if (! $thissection = $sections[$section]) {
if (!empty($sections[$section])) {
$thissection = $sections[$section];
} else {
$thissection->course = $course->id; // Create a new section structure
$thissection->section = $section;
$thissection->summary = "";
+3 -1
View File
@@ -147,7 +147,9 @@
echo "<TD $colormain VALIGN=top WIDTH=\"100%\">";
echo "<P><FONT SIZE=3 COLOR=\"$THEME->cellheading2\">$weekday - $endweekday</FONT></P>";
if (! $thisweek = $sections[$week]) {
if (!empty($sections[$week])) {
$thisweek = $sections[$week];
} else {
$thisweek->course = $course->id; // Create a new week structure
$thisweek->section = $week;
$thisweek->summary = "";