Skip to content

Commit 8777708

Browse files
committed
Fix dropping search index
Error Cannot use object of type stdClass as array
1 parent 6af8698 commit 8777708

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Doctrine/ODM/MongoDB/SchemaManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function deleteDocumentSearchIndexes(string $documentName): void
465465
$collection = $this->dm->getDocumentCollection($class->name);
466466

467467
try {
468-
$searchIndexes = $collection->listSearchIndexes();
468+
$searchIndexes = $collection->listSearchIndexes(['typeMap' => ['root' => 'bson']]);
469469
} catch (CommandException $e) {
470470
// If the server does not support search indexes, there are no indexes to remove in any case
471471
if ($this->isSearchIndexCommandException($e)) {

0 commit comments

Comments
 (0)