doctrine/mongodb-odm — pull request #384 by AlexTiTanium (2012-08-02 21:48:40+00:00)
Title: Fix odm schema create fatal error

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"