Ensure Query always serializes $query as a BSON object

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.0.0-alpha1
    • Affects Version/s: 0.5.1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Based on phongo_query_init(), it appears that an empty filter array for the Query constructor could result in $query becoming a BSON array:

      Z_ADDREF_P(filter);
      add_assoc_zval_ex(zquery, ZEND_STRS("$query"), filter);
      

      We should consider calling convert_to_object_ex() beforehand.

              Assignee:
              Hannes Magnusson (Inactive)
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: