diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-06-19 08:13:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-06-19 08:13:14 +0000 |
commit | a7af266b6d608dd9176bbafd433b86a9e78721d2 (patch) | |
tree | 44534c3eeef7a14f3d487ff0906864bfd47bf20f | |
parent | 5cb153e335b06037c27c3b6eab35a5c944e7bf15 (diff) | |
download | brdo-a7af266b6d608dd9176bbafd433b86a9e78721d2.tar.gz brdo-a7af266b6d608dd9176bbafd433b86a9e78721d2.tar.bz2 |
- 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.
-rw-r--r-- | includes/theme.inc | 4 |
1 files changed, 2 insertions, 2 deletions
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 = '<table'. drupal_attributes($attributes) .">\n"; // Format the table header: - if (is_array($header)) { + if (count($header)) { $ts = tablesort_init($header); $output .= ' <tr>'; 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(); |