Javascript objects are always serialized as BSON code types without scope

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2.0
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: