Commit 7ba19662 authored by Jeremy Mikola's avatar Jeremy Mikola

PHPLIB-63: Fix index creation for legacy servers

This can be removed for PHPLIB-87 once PHPC-274 is resolved.
parent 3df5e5ec
......@@ -1230,7 +1230,8 @@ class Collection
$bulk = new BulkWrite(true);
foreach ($indexes as $index) {
$bulk->insert($index);
// TODO: Remove this once PHPC-274 is resolved (see: PHPLIB-87)
$bulk->insert($index->bsonSerialize());
}
$server->executeBulkWrite($this->dbname . '.system.indexes', $bulk);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment