1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 10:41:24 +02:00

Make sure sort key exists

This commit is contained in:
Toby Zerner
2015-07-28 12:27:59 +09:30
parent 4f5e1d4aa3
commit 681135ac99

View File

@@ -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]
];