mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Prevent error from occurring when the active sorting column is hidden from the results.
Fixes #5227
This commit is contained in:
parent
b1954e9258
commit
18af35d928
@ -522,7 +522,7 @@ class Lists extends WidgetBase
|
||||
/*
|
||||
* Apply sorting
|
||||
*/
|
||||
if (($sortColumn = $this->getSortColumn()) && !$this->showTree) {
|
||||
if (($sortColumn = $this->getSortColumn()) && !$this->showTree && in_array($sortColumn, array_keys($this->getVisibleColumns()))) {
|
||||
if (($column = array_get($this->allColumns, $sortColumn)) && $column->valueFrom) {
|
||||
$sortColumn = $this->isColumnPivot($column)
|
||||
? 'pivot_' . $column->valueFrom
|
||||
|
Loading…
x
Reference in New Issue
Block a user