Skip to content

[TypeError] Return value of Codeception\Lib\Driver\Db::lastInsertId() must be of the type string, bool returned #49

@szhajdu

Description

@szhajdu

Based on PDO documentation lastInsertId can be string|false, but Codeception\Lib\Driver\Db::lastInsertId has a string return value, so tables without auto increment field could fail with type error. Tried to upgrade using MS SQL Server in my tests.

Probably a simple cast to string could solve the issue, but not sure if it has any implications on other code.

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