-
Type: Bug
-
Resolution: Duplicate
-
Priority: 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
- duplicates
-
PHPC-1713 Ensure Cursor::current returns null on invalid positions
- Closed