mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding fix for lost data in Model::afterSave();
Closes #2465, Model::save(); now returns the values of $this->data after a successful save; git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5894 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7b914bab9f
commit
353eab91d5
1 changed files with 2 additions and 1 deletions
|
@ -846,8 +846,8 @@ class Model extends Overloadable {
|
|||
if ($x === $this->primaryKey) {
|
||||
$this->id = $y;
|
||||
}
|
||||
$this->data[$n][$x] = $y;
|
||||
}
|
||||
$this->data[$n][$x] = $y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1186,6 +1186,7 @@ class Model extends Overloadable {
|
|||
}
|
||||
}
|
||||
$this->afterSave($created);
|
||||
$success = $this->data;
|
||||
$this->data = false;
|
||||
$this->__exists = null;
|
||||
$this->_clearCache();
|
||||
|
|
Loading…
Add table
Reference in a new issue