diff --git a/templates/system/table.func.php b/templates/system/table.func.php index feecb87f0643f96d9e1a56f1e6815416dac858b1..b523f508eaa824998712b0c0ef32fa09198dbbac 100644 --- a/templates/system/table.func.php +++ b/templates/system/table.func.php @@ -101,7 +101,7 @@ function bootstrap_table(array $variables) { } // Format the table columns: - if (count($colgroups)) { + if (!empty($colgroups)) { foreach ($colgroups as $number => $colgroup) { $attributes = array(); @@ -136,7 +136,7 @@ function bootstrap_table(array $variables) { } // Add the 'empty' row message if available. - if (!count($rows) && $empty) { + if (empty($rows) && !empty($empty)) { $header_count = 0; foreach ($header as $header_cell) { if (is_array($header_cell)) { @@ -156,7 +156,7 @@ function bootstrap_table(array $variables) { } // Format the table header: - if (count($header)) { + if (!empty($header)) { $ts = tablesort_init($header); // HTML requires that the thead tag has tr tags in it followed by tbody // tags. Using ternary operator to check and see if we have any rows. @@ -174,7 +174,7 @@ function bootstrap_table(array $variables) { } // Format the table rows: - if (count($rows)) { + if (!empty($rows)) { $output .= "
\n"; foreach ($rows as $row) { // Check if we're dealing with a simple or complex row. @@ -205,7 +205,7 @@ function bootstrap_table(array $variables) { } // Format the table footer: - if (count($footer)) { + if (!empty($footer)) { $output .= "\n"; foreach ($footer as $row) { // Check if we're dealing with a simple or complex row.