Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Delete returns true when it has failed #12

@jamieburchell

Description

@jamieburchell

When deleting a database row the delete function returns true even if it failed. There doesn't seem to be any checking of the result of the delete and returns true/commits transaction regardless.

// Delete the object itself
$this->db->where('id', $this->id);
$this->db->delete($this->table);

// Complete auto transaction
$this->_auto_trans_complete('delete');

// Clear this object
$this->clear();

return TRUE;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions