Fixing $model parameter in FormHelper::create() (Ticket #1963)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4318 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-22 08:32:00 +00:00
parent d1e375f5dd
commit 7d9ab97745

View file

@ -76,9 +76,10 @@ class FormHelper extends AppHelper {
function create($model = null, $options = array()) {
if (is_array($model) && empty($options)) {
$options = $model;
$model = null;
}
if ($model !== false) {
if (empty($model) && $model !== false) {
$model = $this->params['models'][0];
}