Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: core/model/DataObject.php
- ===================================================================
- --- core/model/DataObject.php (revision 106031)
- +++ core/model/DataObject.php (working copy)
- @@ -1122,6 +1122,9 @@
- user_error("$this->class has a broken onBeforeDelete() function. Make sure that you call parent::onBeforeDelete().", E_USER_ERROR);
- }
- + // Deleting a record without an ID shouldn't do anything
- + if(!$this->ID) throw new Exception("DataObject::delete() called on a DataObject without an ID");
- +
- foreach($this->getClassAncestry() as $ancestor) {
- if(self::has_own_table($ancestor)) {
- $sql = new SQLQuery();
Add Comment
Please, Sign In to add comment