From c4e22b1085fb41a31e7e87ff80d3cc1c0fd8b332 Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:25:35 +0000 Subject: [PATCH] Fix warning when cookie is null --- src/Appwrite/Utopia/Request.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Utopia/Request.php b/src/Appwrite/Utopia/Request.php index a9eef62e06..cb877afad4 100644 --- a/src/Appwrite/Utopia/Request.php +++ b/src/Appwrite/Utopia/Request.php @@ -107,6 +107,10 @@ class Request extends UtopiaRequest { $headers = $this->generateHeaders(); + if (empty($this->swoole->cookie)) { + return $headers; + } + $cookieHeaders = []; foreach ($this->swoole->cookie as $key => $value) { $cookieHeaders[] = "{$key}={$value}";