From a7af266b6d608dd9176bbafd433b86a9e78721d2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 19 Jun 2005 08:13:14 +0000 Subject: - Patch #25143 by Robin: use count() instead of is_array() so we don't render code for empty arrays, and such you don't get warnings using PHP5. --- includes/theme.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index fa3a646aa..2a91b08d8 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -672,7 +672,7 @@ 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) { @@ -683,7 +683,7 @@ function theme_table($header, $rows, $attributes = NULL) { } // Format the table rows: - if (is_array($rows)) { + if (count($rows)) { foreach ($rows as $number => $row) { $attributes = array(); -- cgit v1.2.3