Sunday, February 19, 2012

My answer to "Registration failed. Argument 2 passed to MongoCollection::insert() must be an array, boolean given..."

This is my answer to a Question on Support site for LampCMS project


Thank you. This is interesting, looks like the API for this mongoCollection may have changed since I wrote the class. I mean, there has been several updates to php's Mongo library since then.

Originally it was possible to pass 'true' to MongoCollection insert method as second parameter, meaning a 'safe' mode, meaning to write data to disk immediately.

Indeed, looking a the latest documentation on php.net site it does say that second param cannot be boolean anymore.

http://us2.php.net/manual/en/mongocollection.insert.php

I will make update now and will commit the update to github ASAP.

Thank you.

No comments:

Post a Comment