Commit 769ebb66 authored by Dries's avatar Dries

- Check input given to table rendering functions to avoid warning.
parent f281f0a7
......@@ -213,16 +213,19 @@ function table($header, $rows) {
** Emit the table header:
*/
if (is_array($header)) {
$output .= " <tr>";
foreach ($header as $cell) {
$output .= table_cell($cell, 1);
}
$output .= " </tr>";
}
/*
** Emit the table rows:
*/
if (is_array($rows)) {
foreach ($rows as $number => $row) {
if ($number % 2 == 1) {
$output .= " <tr class=\"light\">";
......@@ -236,6 +239,7 @@ function table($header, $rows) {
}
$output .= " </tr>";
}
}
$output .= "</table>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment