Skip to content

Commit 30aa713

Browse files
committed
Collection::ensureIndex() should convert write options (fixes doctrine#168)
1 parent f781f2b commit 30aa713

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Doctrine/MongoDB/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ protected function doDrop()
485485

486486
public function ensureIndex(array $keys, array $options = array())
487487
{
488+
$options = isset($options['safe']) ? $this->convertWriteConcern($options) : $options;
488489
return $this->getMongoCollection()->ensureIndex($keys, $options);
489490
}
490491

0 commit comments

Comments
 (0)