Cursor::key returns valid values on invalid positions

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.9.1
    • Affects Version/s: 1.9.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: