mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:50:24 +08:00
Make sure sort key exists
This commit is contained in:
parent
4f5e1d4aa3
commit
681135ac99
@ -29,7 +29,7 @@ class IndexAction extends ClientAction
|
||||
$q = array_pull($queryParams, 'q');
|
||||
|
||||
$params = [
|
||||
'sort' => $sort ? $this->sortMap[$sort] : '',
|
||||
'sort' => $sort && isset($this->sortMap[$sort]) ? $this->sortMap[$sort] : '',
|
||||
'filter' => ['q' => $q]
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user