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

Throw exception for invalid BulkWrite::update() newObj argument

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.3.0-beta1, 1.3.0
    • Affects Version/s: 1.1.2
    • Component/s: None
    • None

      If the newObj argument contains a mix of atomic modifiers and field names at its top level, we should raise an exception. PHPLIB already checks for this for its CRUD methods, but the driver is prone to doing only a cursory examination so it can delegate to libmongoc's update or replace functions. Currently, those functions have no way to provide a meaningful error that we can turn into an exception (see: CDRIVER-1111), so we should more carefully examining the newObj to ensure it isn't ambiguous.

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

              Created:
              Updated:
              Resolved: