Skip to content

What is the alternative for Fatal error: Uncaught Error: Call to undefined method MongoDB\Driver\Cursor::hasNext? #703

Closed
@ziyaindia

Description

@ziyaindia

What is the alternative for Fatal error: Uncaught Error: Call to undefined method MongoDB\Driver\Cursor::hasNext?

One of my application using MongoDB Client library with old php version. I just upgraded my php version as well as upgraded mongo library. When following function is calling, it's giving me

Fatal error: Uncaught Error: Call to undefined method MongoDB\Driver\Cursor::hasNext

`function get_result_row () {

    if ($this->cursor->hasNext()) {
        return $this->cursor->getNext();
    }

}`

Please suggest how i can fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions