Commit 7f32eb1f authored by Dries's avatar Dries
Browse files

- Patch #7967 by matthias: small patch to improve the robustness of the tablesorting code.

parent 92818319
...@@ -95,7 +95,7 @@ function tablesort_get_sort($headers) { ...@@ -95,7 +95,7 @@ function tablesort_get_sort($headers) {
// user has not specified a sort. check module for default and if none, use 'asc' // user has not specified a sort. check module for default and if none, use 'asc'
else { else {
foreach ($headers as $header) { foreach ($headers as $header) {
if (isset($header['sort'])) { if (is_array($header) && isset($header['sort'])) {
return $header['sort']; return $header['sort'];
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment