diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 6bfb95c40..fb911426a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1680,7 +1680,16 @@ function theme_table($variables) { // Add the 'empty' row message if available. if (!count($rows) && $empty) { - $rows[] = array(array('data' => $empty, 'colspan' => count($header), 'class' => array('empty', 'message'))); + $header_count = 0; + foreach ($header as $header_cell) { + if (is_array($header_cell)) { + $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1; + } + else { + $header_count++; + } + } + $rows[] = array(array('data' => $empty, 'colspan' => $header_count, 'class' => array('empty', 'message'))); } // Format the table header: |