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

Cursor::key returns valid values on invalid positions

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.1
    • Affects Version/s: 1.9.0
    • Component/s: None
    • None

      When on an invalid position, MongoDB\Driver\Cursor::key returns a non-null value even if the cursor position is invalid. While users should generally use MongoDB\Driver\Cursor::valid to check for a valid position, this may be confusing (and caused an issue as PHPLIB itself checked for valid positions using key().

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: