mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
updating model habtm saving, check against current hatbm aliases
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6099 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
00dc6dedb5
commit
64e7390a6b
1 changed files with 1 additions and 3 deletions
|
@ -1131,10 +1131,8 @@ class Model extends Overloadable {
|
|||
return false;
|
||||
}
|
||||
$fields = $values = array();
|
||||
$habtm = count($this->hasAndBelongsToMany);
|
||||
|
||||
foreach ($this->data as $n => $v) {
|
||||
if (isset($v[$n]) && $habtm > 0) {
|
||||
if (isset($v[$n]) && in_array($n, array_keys($this->hasAndBelongsToMany))) {
|
||||
$joined[] = $v;
|
||||
} else {
|
||||
if ($n === $this->alias) {
|
||||
|
|
Loading…
Add table
Reference in a new issue