Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-376

countDocuments() throws an exception if no documents are found

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.4.2
    • Affects Version/s: 1.4.0
    • Component/s: None
    • None

      If the initial $match stage in CountDocuments' aggregation pipeline matches no documents, there will be no input for the $group stage and an empty result set will be returned.

      This causes CountDocuments::execute() to throw due to an unexpected type.

            Assignee:
            derick Derick Rethans
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: