mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing blackHole when form has more than one model with check boxes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5742 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
28bc0879b2
commit
348e31530a
1 changed files with 5 additions and 2 deletions
|
@ -484,8 +484,8 @@ class SecurityComponent extends Object {
|
|||
}
|
||||
}
|
||||
}
|
||||
$merge = array();
|
||||
foreach ($check as $key => $value) {
|
||||
$merge = array();
|
||||
if ($key === '__Token') {
|
||||
$field[$key] = $value;
|
||||
continue;
|
||||
|
@ -515,8 +515,11 @@ class SecurityComponent extends Object {
|
|||
$merge[] = $lookup;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($field[$newKey])) {
|
||||
$field[$newKey] = array_merge($merge, $field[$newKey]);
|
||||
} else {
|
||||
$field[$newKey] = $merge;
|
||||
}
|
||||
$controller->data[$newKey] = Set::pushDiff($controller->data[$key], $controller->data[$newKey]);
|
||||
unset($controller->data[$key]);
|
||||
|
@ -601,4 +604,4 @@ class SecurityComponent extends Object {
|
|||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
Loading…
Add table
Reference in a new issue