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

Public property with zero-length name ignored during BSON encoding

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.3
    • Affects Version/s: 1.2.2
    • Component/s: None
    • None

      BSON corpus spec tests for "Empty-string key subdoc" currently fail because is_public_property() returns false for an property whose name is an empty string.

      This is an edge case, but such a property name could be created by casting ['' => 1] to an object (i.e. stdClass), which is exactly the code path encountered by the spec test when the BSON data is round-tripped through PHP.

            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: