mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing $model parameter for FormHelper::create(). Must pass false if the form is not associated with a model.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4295 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e049d680e0
commit
23cb3451c0
1 changed files with 3 additions and 1 deletions
|
@ -77,9 +77,11 @@ class FormHelper extends AppHelper {
|
|||
if (is_array($model) && empty($options)) {
|
||||
$options = $model;
|
||||
}
|
||||
if (!is_null($model) && (empty($model) || is_array($model))) {
|
||||
|
||||
if ($model !== false) {
|
||||
$model = $this->params['models'][0];
|
||||
}
|
||||
|
||||
if (ClassRegistry::isKeySet($model)) {
|
||||
$object =& ClassRegistry::getObject($model);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue