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

MongoDB\Driver\Cursor::current() returns nothing but it should

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      PHP 8.0.0
      MnogoDB 4.2.9
      Apache 2.4.41
      Ubuntu 20.04.1

      Hi all

      I don't know if I'm supposed to write here. Tell me if I'm not.

      var_dump(get_class($usernameInDb)); returns string(21) "MongoDB\Driver\Cursor"

      var_dump($usernameInDb); shows that there is a document.

      $avirer = $usernameInDb->current(); doesn't cause a PHP error in error.log.

      var_dump($avirer); returns int(8) string(26) "Undefined variable: avirer"

      It seems to me in contradiction with https://www.php.net/manual/en/class.mongodb-driver-cursor.php

            Assignee:
            Unassigned Unassigned
            Reporter:
            mcoulont@yahoo.fr Marc Coulont
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: