Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.60
diff -u -r1.60 tablesort.inc
--- includes/tablesort.inc	28 Oct 2010 02:27:08 -0000	1.60
+++ includes/tablesort.inc	1 Nov 2010 14:21:11 -0000
@@ -80,7 +80,7 @@
     // User has not specified a sort. Use default if specified; otherwise use "asc".
     else {
       foreach ($this->header as $header) {
-        if (isset($header['sort'])) {
+        if (is_array($header) && isset($header['sort'])) {
           return $header['sort'];
         }
       }
@@ -279,7 +279,7 @@
   // User has not specified a sort. Use default if specified; otherwise use "asc".
   else {
     foreach ($headers as $header) {
-      if (isset($header['sort'])) {
+      if (is_array($header) && isset($header['sort'])) {
         return $header['sort'];
       }
     }
