diff --git a/src/engine/Api/V1/Processors/Minimize.php b/src/engine/Api/V1/Processors/Minimize.php index 350fcc66..74fe3e33 100644 --- a/src/engine/Api/V1/Processors/Minimize.php +++ b/src/engine/Api/V1/Processors/Minimize.php @@ -34,7 +34,7 @@ class Minimize implements ProcessorsInterface { * @param array &$response The response array to be processed. */ public static function process(array &$response) { - if (!isset($_GET['fields'])) { + if (!isset($_GET['fields']) || empty($response)) { return; } diff --git a/src/engine/Api/V1/Processors/Paginate.php b/src/engine/Api/V1/Processors/Paginate.php index da56a010..153005d0 100644 --- a/src/engine/Api/V1/Processors/Paginate.php +++ b/src/engine/Api/V1/Processors/Paginate.php @@ -33,7 +33,7 @@ class Paginate implements ProcessorsInterface { * @param array &$response The response array to be processed. */ public static function process(array &$response) { - if (!isset($_GET['page'])) { + if (!isset($_GET['page']) || empty($response)) { return; } diff --git a/src/engine/Api/V1/Processors/Search.php b/src/engine/Api/V1/Processors/Search.php index b22eba05..d8b2a7e2 100644 --- a/src/engine/Api/V1/Processors/Search.php +++ b/src/engine/Api/V1/Processors/Search.php @@ -27,7 +27,7 @@ class Search implements ProcessorsInterface { * @param array &$response The response array to be processed. */ public static function process(array &$response) { - if (!isset($_GET['q'])) { + if (!isset($_GET['q']) || empty($response)) { return; } diff --git a/src/engine/Api/V1/Processors/Sort.php b/src/engine/Api/V1/Processors/Sort.php index 7c72d67c..460ff0c0 100644 --- a/src/engine/Api/V1/Processors/Sort.php +++ b/src/engine/Api/V1/Processors/Sort.php @@ -30,7 +30,7 @@ class Sort implements ProcessorsInterface { * @param array &$response The response array to be processed. */ public static function process(array &$response) { - if (!isset($_GET['sort'])) { + if (!isset($_GET['sort']) || empty($response)) { return; }