From 7f32eb1f1eb9baceb38a9a2efa993d66c3938c94 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Tue, 25 May 2004 05:03:03 +0000
Subject: [PATCH] - Patch #7967 by matthias: small patch to improve the
 robustness of the tablesorting code.

---
 includes/tablesort.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index b5b5c31d8382..83230c427bb9 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -95,7 +95,7 @@ function tablesort_get_sort($headers) {
   // user has not specified a sort.  check module for default and if none, use 'asc'
   else {
     foreach ($headers as $header) {
-      if (isset($header['sort'])) {
+      if (is_array($header) && isset($header['sort'])) {
         return $header['sort'];
       }
     }
-- 
GitLab