From 03c48a5ef3bcd23baf97c4eb7e79bc75fa215712 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 15 Jul 2024 05:35:04 +0000 Subject: [PATCH] set null when not required and data key is not set --- src/Appwrite/Utopia/Response.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index afbee30f58..2cba368cf8 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -590,7 +590,8 @@ class Response extends SwooleResponse } } - if(!$data->isSet($key) && !$rule['required']) { // skip attribute in response if not required and values does not exist + if(!$data->isSet($key) && !$rule['required']) { // set output key null if data key is not set and required is false + $output[$key] = null; continue; }