Small fix to avoid warnings on empty tables

This commit is contained in:
moodler 2003-09-23 12:18:27 +00:00
parent e2b7251de9
commit a1f8ff87c7

View File

@ -1091,21 +1091,23 @@ function print_table($table) {
echo "</tr>\n";
}
foreach ($table->data as $row) {
echo "<tr valign=\"top\">";
foreach ($row as $key => $item) {
if (!isset($size[$key])) {
$size[$key] = "";
}
if (!isset($align[$key])) {
$align[$key] = "";
}
if (!isset($wrap[$key])) {
$wrap[$key] = "";
}
echo "<td ".$align[$key].$size[$key].$wrap[$key]." class=\"generaltablecell\">$item</td>";
if (!empty($table->data)) {
foreach ($table->data as $row) {
echo "<tr valign=\"top\">";
foreach ($row as $key => $item) {
if (!isset($size[$key])) {
$size[$key] = "";
}
if (!isset($align[$key])) {
$align[$key] = "";
}
if (!isset($wrap[$key])) {
$wrap[$key] = "";
}
echo "<td ".$align[$key].$size[$key].$wrap[$key]." class=\"generaltablecell\">$item</td>";
}
echo "</tr>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
print_simple_box_end();