From 1ededa7727cc6d4d4496def071482b6a9f7a1dfc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 14 Aug 2026 17:52:17 +1200 Subject: [PATCH] fix: use ParsedQuery properties after groupByType --- src/Appwrite/Platform/Modules/Presences/HTTP/XList.php | 2 +- .../Platform/Modules/Project/Http/Project/MockPhone/XList.php | 4 ++-- .../Platform/Modules/Project/Http/Project/OAuth2/XList.php | 4 ++-- .../Platform/Modules/Project/Http/Project/Policies/XList.php | 4 ++-- .../Modules/Project/Http/Project/Templates/Email/XList.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php index 94dca8c4ee..0766d9d6fb 100644 --- a/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php +++ b/src/Appwrite/Platform/Modules/Presences/HTTP/XList.php @@ -92,7 +92,7 @@ class XList extends PlatformAction } $groupedQueries = Query::groupByType($queries); - $filterQueries = $groupedQueries['filters']; + $filterQueries = $groupedQueries->filters; // should be excluded from the user provided query as user query would be used for caching only // otherwise cache will always miss due to the datetime now diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/MockPhone/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/MockPhone/XList.php index 82aa7f1446..3a75eae6a1 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/MockPhone/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/MockPhone/XList.php @@ -71,8 +71,8 @@ class XList extends Action $auths = $project->getAttribute('auths', []); $mockNumbers = $auths['mockNumbers'] ?? []; $grouped = Query::groupByType($queries); - $limit = $grouped['limit'] ?? null; - $offset = $grouped['offset'] ?? 0; + $limit = $grouped->limit ?? null; + $offset = $grouped->offset ?? 0; $total = $includeTotal ? \count($mockNumbers) : 0; $mockNumbers = \array_slice($mockNumbers, $offset, $limit); diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/XList.php index 78e7a8c1e8..8db4309c5e 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2/XList.php @@ -94,8 +94,8 @@ class XList extends Action $total = $includeTotal ? \count($documents) : 0; $grouped = Query::groupByType($queries); - $offset = $grouped['offset'] ?? 0; - $limit = $grouped['limit'] ?? null; + $offset = $grouped->offset ?? 0; + $limit = $grouped->limit ?? null; $documents = \array_slice($documents, $offset, $limit); diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Policies/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Policies/XList.php index 8e6000bd9e..000a482c4e 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Policies/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Policies/XList.php @@ -76,8 +76,8 @@ class XList extends Action $total = $includeTotal ? \count($policies) : 0; $grouped = Query::groupByType($queries); - $offset = $grouped['offset'] ?? 0; - $limit = $grouped['limit'] ?? null; + $offset = $grouped->offset ?? 0; + $limit = $grouped->limit ?? null; $policies = \array_slice($policies, $offset, $limit); diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/XList.php index d15f2f856c..0f235903c5 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/XList.php @@ -101,8 +101,8 @@ class XList extends Action $total = $includeTotal ? \count($emailTemplates) : 0; $grouped = Query::groupByType($queries); - $offset = $grouped['offset'] ?? 0; - $limit = $grouped['limit'] ?? null; + $offset = $grouped->offset ?? 0; + $limit = $grouped->limit ?? null; $emailTemplates = \array_slice($emailTemplates, $offset, $limit);