mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
updating form.php, fixes #3942 "FormHelper::create() ignores non-standard primary key"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6389 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5b29c6a71f
commit
1c3d18db23
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,6 @@ class FormHelper extends AppHelper {
|
|||
*/
|
||||
function create($model = null, $options = array()) {
|
||||
$defaultModel = null;
|
||||
$data = $this->fieldset;
|
||||
$view =& ClassRegistry::getObject('view');
|
||||
|
||||
if (is_array($model) && empty($options)) {
|
||||
|
@ -134,6 +133,7 @@ class FormHelper extends AppHelper {
|
|||
'validates' => (ife(empty($object->validate), array(), array_keys($object->validate)))
|
||||
);
|
||||
}
|
||||
$data = $this->fieldset;
|
||||
|
||||
if (isset($this->data[$model]) && isset($this->data[$model][$data['key']]) && !empty($this->data[$model][$data['key']])) {
|
||||
$created = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue