diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-22 22:33:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-22 22:33:29 +0000 |
commit | df17569a0443ed474051583f1db0d11f5fbdedae (patch) | |
tree | 4b3fad10d63b60258bb853a81ebd8437d6bf9911 /includes/theme.inc | |
parent | 9a2c9fee0466bb2aa98df9dd9d5edf21f0cf6896 (diff) | |
download | brdo-df17569a0443ed474051583f1db0d11f5fbdedae.tar.gz brdo-df17569a0443ed474051583f1db0d11f5fbdedae.tar.bz2 |
- Patch #722978 by Alan D., duellj: invalid header count for empty message in theme_table().
Diffstat (limited to 'includes/theme.inc')
-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: |