mirror of
https://github.com/flarum/core.git
synced 2025-07-31 05:30:38 +02:00
Make sure sort key exists
This commit is contained in:
@@ -29,7 +29,7 @@ class IndexAction extends ClientAction
|
|||||||
$q = array_pull($queryParams, 'q');
|
$q = array_pull($queryParams, 'q');
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'sort' => $sort ? $this->sortMap[$sort] : '',
|
'sort' => $sort && isset($this->sortMap[$sort]) ? $this->sortMap[$sort] : '',
|
||||||
'filter' => ['q' => $q]
|
'filter' => ['q' => $q]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user