File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5812,7 +5812,16 @@ public function deleteDocuments(
58125812 $ internalIds = [];
58135813 $ permissionIds = [];
58145814 foreach ($ batch as $ document ) {
5815+ if (empty ($ document ->getInternalId ())){
5816+ throw new QueryException ('$internalId must not be empty ' );
5817+ }
5818+
58155819 $ internalIds [] = $ document ->getInternalId ();
5820+
5821+ if (!array_key_exists ('$permissions ' , $ document )) {
5822+ throw new QueryException ('$permissions key is missing ' );
5823+ }
5824+
58165825 if (!empty ($ document ->getPermissions ())) {
58175826 $ permissionIds [] = $ document ->getId ();
58185827 }
@@ -5825,6 +5834,10 @@ public function deleteDocuments(
58255834 }
58265835
58275836 // Check if document was updated after the request timestamp
5837+ if (empty ($ document ->getUpdatedAt ())){
5838+ throw new QueryException ('$updatedAt must not be empty ' );
5839+ }
5840+
58285841 try {
58295842 $ oldUpdatedAt = new \DateTime ($ document ->getUpdatedAt ());
58305843 } catch (Exception $ e ) {
You can’t perform that action at this time.
0 commit comments