summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkosborne2018-09-14 17:57:25 (GMT)
committerMark Carver2018-09-14 17:57:25 (GMT)
commit2d2d397f1b77de02258270dda9a665e82c654450 (patch)
tree57029c696f920c4b038e749988e97647ac2222c8
parentc050d1d6ae85ef344be85dbf0a4ed9ec68ac32ce (diff)
Issue #2999011 by bkosborne, markcarver: PHP 7 - Warning: count(): Parameter must be an array or an object that implements Countable in bootstrap_table() line 238
-rw-r--r--templates/system/table.func.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/system/table.func.php b/templates/system/table.func.php
index feecb87..b523f50 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 .= "<tbody>\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 .= "<tfoot>\n";
foreach ($footer as $row) {
// Check if we're dealing with a simple or complex row.