- 
    Type:Bug 
- 
    Resolution: Done
- 
    Priority:Major - P3 
- 
    Affects Version/s: 1.0.0-beta1
- 
    Component/s: None
- 
    None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
With the 1.3.0 upgrade, the findOne test within PHPLIB began triggering this assertion failure in libmongoc:
src/libmongoc/src/mongoc/mongoc-cursor.c:52 _mongoc_n_return(): precondition failed: remaining > 0
Dumping the Query object in the PHP driver reported int(4294967295) as the limit (largest possible 32-bit int), which jives with libmongoc using a uint32_t for the cursor limit and PHPLIB specifying -1 for its FindOne limit. IIRC, -1 and 1 are both handled the same by the server (the cursor is immediately closed), so it's a trivial fix in PHPLIB to use 1 instead of -1.
- is related to
- 
                    CDRIVER-982 "limit" not used in OP_QUERY message header -         
- Closed
 
-