Priority: Major - P3
Affects Version/s: 1.3.4
Fix Version/s: 1.4.0
Last comment by Customer:true
mongodb/mongo-php-library#449 reported a curious issue where using a specific document in a findOne query resulted in an InvalidArgumentException with the following message:
Client Error: bad object in message: bson length doesn't match what we found in object with unknown _id
This error message come from bson_validate.cpp in the server.
The following script reproduces the error:
Aside from the error message, it's odd that this is reported as an InvalidArgumentException instead of a RuntimeException.
Beyond this, attempting to insert the same document produces a segfault:
This appears to be specific to the PHP driver and libmongoc, as the document can be used just fine via the shell: