@@ -5689,7 +5689,7 @@ public function createDocuments(
56895689 $ idsByTenant [$ doc ->getTenant ()][] = $ doc ->getId ();
56905690 }
56915691 foreach ($ idsByTenant as $ tenant => $ tenantIds ) {
5692- $ tenantIds = \array_values (\array_unique (\array_filter ($ tenantIds )));
5692+ $ tenantIds = \array_values (\array_unique (\array_filter ($ tenantIds, fn ( $ v ) => $ v !== null )));
56935693 foreach (\array_chunk ($ tenantIds , \max (1 , $ this ->maxQueryValues )) as $ idChunk ) {
56945694 $ existing = $ this ->authorization ->skip (fn () => $ this ->withTenant ($ tenant , fn () => $ this ->silent (fn () => $ this ->find (
56955695 $ collection ->getId (),
@@ -5706,7 +5706,8 @@ public function createDocuments(
57065706 }
57075707 } else {
57085708 $ inputIds = \array_values (\array_unique (\array_filter (
5709- \array_map (fn (Document $ doc ) => $ doc ->getId (), $ documents )
5709+ \array_map (fn (Document $ doc ) => $ doc ->getId (), $ documents ),
5710+ fn ($ v ) => $ v !== null
57105711 )));
57115712
57125713 foreach (\array_chunk ($ inputIds , \max (1 , $ this ->maxQueryValues )) as $ idChunk ) {
@@ -7252,7 +7253,7 @@ public function upsertDocumentsWithIncrease(
72527253 $ seenIds = [];
72537254
72547255 // Batch-fetch existing documents in one query instead of N individual getDocument() calls
7255- $ ids = \array_filter (\array_map (fn ($ doc ) => $ doc ->getId (), $ documents ));
7256+ $ ids = \array_filter (\array_map (fn ($ doc ) => $ doc ->getId (), $ documents ), fn ( $ v ) => $ v !== null );
72567257 $ existingDocs = [];
72577258 $ upsertTenantPerDocument = $ this ->getSharedTables () && $ this ->getTenantPerDocument ();
72587259
@@ -7268,7 +7269,7 @@ public function upsertDocumentsWithIncrease(
72687269 $ idsByTenant [$ tenant ][] = $ doc ->getId ();
72697270 }
72707271 foreach ($ idsByTenant as $ tenant => $ tenantIds ) {
7271- $ tenantIds = \array_values (\array_unique (\array_filter ($ tenantIds )));
7272+ $ tenantIds = \array_values (\array_unique (\array_filter ($ tenantIds, fn ( $ v ) => $ v !== null )));
72727273 foreach (\array_chunk ($ tenantIds , \max (1 , $ this ->maxQueryValues )) as $ idChunk ) {
72737274 $ fetched = $ this ->authorization ->skip (fn () => $ this ->withTenant ($ tenant , fn () => $ this ->silent (fn () => $ this ->find (
72747275 $ collection ->getId (),
0 commit comments