The processors should not work if the response is empty.

This commit is contained in:
Alex Tselegidis 2016-07-10 13:15:14 +02:00
parent 97e1b670ed
commit 6f25d3af17
4 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

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

View file

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