From 372191036333b6395b813a936d3def2ec0c6901d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 13:56:11 +0200 Subject: [PATCH] Updated empty response result --- src/Appwrite/Utopia/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index ce22df225..1010e237c 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -39,6 +39,7 @@ use Appwrite\Utopia\Response\Model\Tag; use Appwrite\Utopia\Response\Model\Task; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Webhook; +use stdClass; /** * @method public function setStatusCode(int $code = 200): Response @@ -257,8 +258,7 @@ class Response extends SwooleResponse $item = self::getFilter()->parse($output, $model); } - $this->json($output); - + $this->json(!empty($output) ? $output : new stdClass()); } /**