doctrine/mongodb-odm — pull request #380 by AlexTiTanium (2012-08-02 07:22:19+00:00)
Title: Update lib/Doctrine/ODM/MongoDB/SchemaManager.php

In CLI mode, on command odm:schema:create. May produce some error, it path fix aftermath, but not reason. I am think that error hapens becouse code:

if (!isset($index['options']['safe'])) {
$index['options']['safe'] = true;
}

look normal, but if $index['options'] == bool suddenly provide error.

prevent error: "Cannot use a scalar value as an array", if $index['options'] == 1(bool)

It may provide fatal error: "Catchable fatal error: Argument 2 passed to Doctrine\MongoDB\Collection::ensureIndex() must be an array, boolean given"