From ce07c6ffd5830821be602f7cb1a71a40868584e5 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 7 May 2026 12:24:42 +0530 Subject: [PATCH] added type error to the subscribe handler --- src/Appwrite/Realtime/Message/Handlers/Subscribe.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 76a4e5d3b8..8620a121b5 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -57,6 +57,8 @@ class Subscribe extends Action $convertedQueries = Realtime::convertQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); + } catch (\TypeError $e) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: query elements must be strings.'); } $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId));