From 681135ac99016fbc4b737a1bcb9442a58e92a9e2 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 28 Jul 2015 12:27:59 +0930 Subject: [PATCH] Make sure sort key exists --- framework/core/src/Forum/Actions/IndexAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Forum/Actions/IndexAction.php b/framework/core/src/Forum/Actions/IndexAction.php index f7d1cef2a..3894f118d 100644 --- a/framework/core/src/Forum/Actions/IndexAction.php +++ b/framework/core/src/Forum/Actions/IndexAction.php @@ -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] ];