- 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.
parent
5cb153e335
commit
a7af266b6d
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue