summaryrefslogtreecommitdiffstats
path: root/core/Controller/AutoCompleteController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/AutoCompleteController.php')
-rw-r--r--core/Controller/AutoCompleteController.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php
index 2e01f85c639..1619f9b9edd 100644
--- a/core/Controller/AutoCompleteController.php
+++ b/core/Controller/AutoCompleteController.php
@@ -73,11 +73,13 @@ class AutoCompleteController extends Controller {
unset($results['exact']);
$results = array_merge_recursive($exactMatches, $results);
- $sorters = array_reverse(explode('|', $sorter));
- $this->autoCompleteManager->runSorters($sorters, $results, [
- 'itemType' => $itemType,
- 'itemId' => $itemId,
- ]);
+ if($sorter !== null) {
+ $sorters = array_reverse(explode('|', $sorter));
+ $this->autoCompleteManager->runSorters($sorters, $results, [
+ 'itemType' => $itemType,
+ 'itemId' => $itemId,
+ ]);
+ }
// transform to expected format
$results = $this->prepareResultArray($results);