bson_append_code_with_scope drops empty scope

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • 1.5.0
    • Affects Version/s: None
    • Component/s: libbson
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If the scope is empty, bson_append_code_with_scope delegates instead to bson_append_code, changing the requested type.

      This behavior is undocumented.

      The offending lines appear to be 955-957 in bson.c:

         if (bson_empty0 (scope)) {
            return bson_append_code (bson, key, key_length, javascript);
         }
      

              Assignee:
              [DO NOT USE] Backlog - C Driver Team
              Reporter:
              David Golden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: