Skip to content

updateObject method in DatabaseDriver.php always returns true #320

@renekreijveld

Description

@renekreijveld

Steps to reproduce the issue

Can only be reproduced if a database update fails.

Expected result

The updateObject method runs the query and should return the result of the execute() statement.

Actual result

The updateObject method runs the query and regardless of the result of the execute statement, it always returns true.

System information (as much as possible)

See the implemention of the updateObject method in PgsqlDriver.php.

Additional comments

Although the execute statement might trigger an exception, it would be better if the updateObject method itself returns a boolean value that represents the result of the update.
It might also be good to look at the insertObject method in DatabaseDriver.php. That too always returns true, whether or not the execute statement failed or not.

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