bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 166 forks source link

The 'safe' option is depricated #149

Closed egyptianbman closed 10 years ago

egyptianbman commented 10 years ago

"PHP error: MongoCollection::insert(): The 'safe' option is deprecated, please use 'w' instead"

replacing array('safe' => true) with array('w' => true) in remove(), insert() and update() resolves the issue.

bobthecow commented 10 years ago

No it's not.

You're using an unreleased (and hence, unsupported) version of the PHP Mongo driver. safe will be deprecated in the next release, but they don't even have a beta release out, let alone an RC or a stable release :)

bobthecow commented 10 years ago

As is fitting, the fix for a bug with an unreleased version of the driver is to use an unreleased version of Genghis :)

The develop branch has had a fix for this for three months or so. Give that version a shot and let me know if it doesn't work for you?

https://github.com/bobthecow/genghis/tree/develop

bobthecow commented 10 years ago

Since this has come up more than once (see #137) I've shipped a fix for it in v1.3.9. Update to the latest version of Genghis to get it :)

egyptianbman commented 10 years ago

Thank you!