countDocuments() throws an exception if no documents are found

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Critical - P2
    • 1.4.2
    • Affects Version/s: 1.4.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 Rethans
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: