Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-246

Advancing cursor should check for errors

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 0.4.1
    • Component/s: None
    • None

      In the 1.x driver, where MongoCursor is an Iterator, each call to next() when iterating through the cursor will invoke php_mongo_handle_error(). Phongo's move_forward iterator handle currently does not check for errors if mongoc_cursor_next() returns false. Errors are only caught when the query or command is first executed.

      One possible way to test for this might be killing a cursor between getmore calls. The current code would simply not return more results, while we would actually expect an exception for issuing a getmore on an invalid cursor ID.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: