From 87af38c7dce9449bfe48286fff4a9ea7feb0d54a Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 22 Nov 2006 20:25:13 +0000 Subject: [PATCH] Merging fixes from [3908] for Ticket #1689 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3909 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 4 ++++ 1 file changed, 4 insertions(+) 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']};