From 85da691aecfb9434cd1062b5cd47536845ffc79d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 24 Sep 2025 13:05:37 +0530 Subject: [PATCH] allow null adapter --- .../Platform/Modules/Functions/Workers/Builds.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 9dc70718a5..ce45d6b629 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1390,10 +1390,12 @@ class Builds extends Action * @param Realtime $queueForRealtime * @param Database $dbForProject * @param Document $deployment + * @param array $runtime + * @param string|null $adapter * @return void * @throws Exception */ - protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, string $adapter): void + protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, ?string $adapter): void { if (!($queueForRealtime instanceof Realtime)) { throw new Exception('queueForRealtime must be an instance of Realtime'); @@ -1407,8 +1409,8 @@ class Builds extends Action if (!is_array($runtime)) { throw new Exception('runtime must be an array'); } - if (!is_string($adapter)) { - throw new Exception('adapter must be a string'); + if (!is_string($adapter) && !is_null($adapter)) { + throw new Exception('adapter must be a string or null'); } }