Do not check for null return from mongoc_collection_find_with_opts()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • 1.3.0-beta1, 1.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Quoting jesse in CDRIVER-1110:

      By the way I notice a "FIXME" in Phongo to deal with a NULL return from mongoc_collection_find_with_opts – that can never happen, mongoc_collection_find_with_opts always returns a cursor.

      Remove the following code from phongo_execute_query():

      /* mongoc issues a warning we need to catch somehow */
      if (!cursor) {
          phongo_throw_exception(PHONGO_ERROR_MONGOC_FAILED TSRMLS_CC, "%s", "FIXME: Couldn't create cursor...");
          return false;
      }
      

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: