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

Ensure Query always serializes $query as a BSON object

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-alpha1
    • Affects Version/s: 0.5.1
    • Component/s: 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:
            bjori Hannes Magnusson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: