diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 015281f18..34507b05c 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1159,6 +1159,8 @@ class Model extends Overloadable { * @access protected */ function _deleteHasMany($id, $cascade) { + $records = array(); + foreach($this->hasMany as $assoc => $data) { if ($data['dependent'] === true && $cascade === true) { $model =& $this->{$data['className']}; @@ -1180,6 +1182,8 @@ class Model extends Overloadable { * @access protected */ function _deleteHasOne($id, $cascade) { + $records = array(); + foreach($this->hasOne as $assoc => $data) { if ($data['dependent'] === true && $cascade === true) { $model =& $this->{$data['className']};