mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
minor optimization to save one call to Helper::model() when creating forms.
This commit is contained in:
parent
99e5f4a49f
commit
8ef2a82a89
1 changed files with 3 additions and 2 deletions
|
@ -216,8 +216,9 @@ class FormHelper extends AppHelper {
|
|||
$object =& $this->_introspectModel($model);
|
||||
$this->setEntity($model . '.', true);
|
||||
|
||||
if (isset($this->fieldset[$this->model()]['key'])) {
|
||||
$data = $this->fieldset[$this->model()];
|
||||
$modelEntity = $this->model()
|
||||
if (isset($this->fieldset[$modelEntity]['key'])) {
|
||||
$data = $this->fieldset[$modelEntity];
|
||||
$recordExists = (
|
||||
isset($this->data[$model]) &&
|
||||
!empty($this->data[$model][$data['key']])
|
||||
|
|
Loading…
Add table
Reference in a new issue