From 66589e2f1883aa9134fecca22f27e5b1f46284ab Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 7 Sep 2008 13:03:51 +0000 Subject: [PATCH] fixing undefined index in model task when defining custom additional associations git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7563 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/tasks/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index c29988a84..7a4c49f34 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -320,7 +320,8 @@ class ModelTask extends Shell { $primaryKey = $model->primaryKey; $foreignKey = $this->_modelKey($model->name); - $associations = $possibleKeys = array(); + $associations = array('belongsTo' => array(), 'hasMany' => array(), 'hasOne'=> array(), 'hasAndBelongsToMany' => array()); + $possibleKeys = array(); //Look for belongsTo $i = 0;