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

Javascript objects are always serialized as BSON code types without scope

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0
    • Affects Version/s: 1.0.0
    • Component/s: None
    • Labels:
      None

      This bug dates back to the very first release and was introduced in dfbef38 for PHPC-74.

      Javascript objects with a scope are erroneously serialized as BSON code types without a scope. Javascript objects without a scope are erroneously serialized as BSON code_with_scope types; however, since their scope pointer is null, bson_append_code_with_scope() defensively falls back to bson_append_code().

      This was discovered while updating the PHPC-459 tests for libmongoc-1.5.0-rc6, which includes CDRIVER-1335.

            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: