Index: theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.240
diff -u -1 -0 -p -r1.240 theme.inc
--- theme.inc 31 May 2005 21:14:26 -0000 1.240
+++ theme.inc 16 Jun 2005 14:29:35 -0000
@@ -665,32 +665,32 @@ function theme_submenu($links) {
* @param $attributes
* An array of HTML attributes to apply to the table tag.
* @return
* An HTML string representing the table.
*/
function theme_table($header, $rows, $attributes = NULL) {
$output = '
\n";
// Format the table header:
- if (is_array($header)) {
+ if (count($header)) {
$ts = tablesort_init($header);
$output .= ' ';
foreach ($header as $cell) {
$cell = tablesort_header($cell, $header, $ts);
$output .= _theme_table_cell($cell, 1);
}
$output .= "
\n";
}
// Format the table rows:
- if (is_array($rows)) {
+ if (count($rows)) {
foreach ($rows as $number => $row) {
$attributes = array();
// Check if we're dealing with a simple or complex row
if (isset($row['data'])) {
foreach ($row as $key => $value) {
if ($key == 'data') {
$cells = $value;
}
else {