Fixes #3455, Secondary model array in model data causes corruption

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5898 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-25 02:53:54 +00:00
parent c68aedb9c4
commit f57fc45d6f

View file

@ -842,7 +842,7 @@ class Model extends Overloadable {
unset ($this->validationErrors[$x]);
}
if ($n == $this->name || is_array($y)) {
if ($n === $this->name) {
if ($x === $this->primaryKey) {
$this->id = $y;
}