diff --git a/src/engine/Api/V1/Processors/Sort.php b/src/engine/Api/V1/Processors/Sort.php index 2bc1a08a..1f1d82ca 100644 --- a/src/engine/Api/V1/Processors/Sort.php +++ b/src/engine/Api/V1/Processors/Sort.php @@ -53,21 +53,22 @@ class Sort implements ProcessorsInterface { } $arguments = [ - $response, - $sortDirection1, - $sortOrder1 + &$sortOrder1, + &$sortDirection1 ]; if ($sortDirection2) { - $arguments[] = $sortDirection2; $arguments[] = $sortOrder2; + $arguments[] = $sortDirection2; } if ($sortDirection3) { - $arguments[] = $sortDirection3; $arguments[] = $sortOrder3; + $arguments[] = $sortDirection3; } + $arguments[] = &$response; + call_user_func_array('array_multisort', $arguments); } }