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

Ensure "sort" Query option is serialized as BSON object

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.0.0-alpha1
    • Affects Version/s: 0.6.3
    • Component/s: None
    • None

      phongo_query_init() does convert_to_array_ex(&sort); before setting the "sort" option on the query document, which means that sorting on field "0" could result in the sort document serializing as a BSON array instead of an object.

      This isn't a problem for the filter, since it's always run through convert_to_object(filter);.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: