- 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.

4.7.x
Dries Buytaert 2005-06-19 08:13:14 +00:00
parent 5cb153e335
commit a7af266b6d
1 changed files with 2 additions and 2 deletions

View File

@ -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();