mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
d1e375f5dd
commit
7d9ab97745
1 changed files with 2 additions and 1 deletions
|
@ -76,9 +76,10 @@ class FormHelper extends AppHelper {
|
||||||
function create($model = null, $options = array()) {
|
function create($model = null, $options = array()) {
|
||||||
if (is_array($model) && empty($options)) {
|
if (is_array($model) && empty($options)) {
|
||||||
$options = $model;
|
$options = $model;
|
||||||
|
$model = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($model !== false) {
|
if (empty($model) && $model !== false) {
|
||||||
$model = $this->params['models'][0];
|
$model = $this->params['models'][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue