diff options
Diffstat (limited to 'includes/tablesort.inc')
-rw-r--r-- | includes/tablesort.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc index f976eb512..48a445828 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -107,7 +107,7 @@ function tablesort_header($cell, $header, $ts) { * A properly formatted cell, ready for _theme_table_cell(). */ function tablesort_cell($cell, $header, $ts, $i) { - if (isset($header[$i]) && $header[$i]['data'] == $ts['name'] && $header[$i]['field']) { + if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['field'])) { if (is_array($cell)) { if (isset($cell['class'])) { $cell['class'] .= ' active'; @@ -162,6 +162,7 @@ function tablesort_get_order($headers) { else { // The first column specified is initial 'order by' field unless otherwise specified if (is_array($headers[0])) { + $headers[0] += array('data' => NULL, 'field' => NULL); return array('name' => $headers[0]['data'], 'sql' => $headers[0]['field']); } else { |