Arrays with undefined values silently truncated on insert

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.6.2
    • Component/s: JavaScript
    • None
    • Environment:
      1.6.2 server on Win7 x64 ; client 1.6.3 on Ubuntu 10.04 server x86
    • ALL
    • Platforms F (01/29/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When inserting arrays that contain undefined elements, the first undefined element is turned to null & the rest of the array is silently truncated.

      for example:

      db.harbl.drop();
      a = [1];
      a[5] = 1;
      printjson(a);
      db.harbl.insert(

      {a:a}

      );
      db.harbl.find();

            Assignee:
            Mira Carey
            Reporter:
            Sean McKeon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: