nicktacular / php-mongo-session

A PHP session handler with a Mongo DB backend.
MIT License
18 stars 6 forks source link

replace deprecated ensureIndex usage #8

Closed rocksfrow closed 10 years ago

rocksfrow commented 10 years ago

The class is using the now deprecated ensureIndex() function. I noticed this when adding the role, ensureIndex isn't included in the read/write db role.

createIndex should be used for mongo > 1.5.0, and ensureindex should be used for previous versions.

rocksfrow commented 10 years ago

I've updated dbInit() in my fork to use the appropriate function depending on the mongo extension version being used.