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

MongoDB\Driver\Cursor var_dump() weird

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

      The MongoDB\Driver\Cursor var_dump() format looks weird.

      All content is stuffed into a top-level "cursor" key... With only one sibling, server_id.
      No other object do that I believe. BulkWrite for example doesn't have a top-level "bulkwrite" key or anything.

      This also looks very wrong from the code perspective, where the returned array only has 2 elements, but we specifically initialized an array of size 4 with array_init_size().

      Should the contents of the "cursor" key be moved one-level up?

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: