Rahul Rahul - 4 days ago 6
PHP Question

PHP Mongo Cursor loop fails with exception "Could not convert BSON document to a PHP variable"

I am getting following cursor exception while looping from new PHP driver...


"Could not convert BSON document to a PHP variable"


It works well with old PHP drivers.

Answer

I got the issue, it was due to bad corrector inside key of Mongodb document.. sample key: "PR´┐ŻNO"...

Old PHP-Mongo driver handling it well but new driver version 1.1.8 throwing exception "Could not convert BSON document to a PHP variable"....

Comments