From 23b423c6cec28bd69d18d4e887c64513ff5795c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Mart=C3=ADn?= Date: Thu, 18 May 2017 16:04:01 -0400 Subject: [PATCH] #1184 Fix /api/posts returning 500 (#1188) * Fix ListPostsController::applyFilters not receiving array if argument not present * Whoops! Use `[]` instead of `array()` * Update AbstractSerializeController.php * Update ListPostsController.php --- src/Api/Controller/AbstractSerializeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Controller/AbstractSerializeController.php b/src/Api/Controller/AbstractSerializeController.php index afa788490..5bcdfb274 100644 --- a/src/Api/Controller/AbstractSerializeController.php +++ b/src/Api/Controller/AbstractSerializeController.php @@ -186,7 +186,7 @@ abstract class AbstractSerializeController implements ControllerInterface */ protected function extractFilter(ServerRequestInterface $request) { - return $this->buildParameters($request)->getFilter(); + return $this->buildParameters($request)->getFilter() ?: []; } /**