mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
fixing possible notices in SecurityComponent::__validatePost, closes #5232
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7545 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
55361320d4
commit
2deb6f3828
1 changed files with 2 additions and 2 deletions
|
@ -604,7 +604,7 @@ class SecurityComponent extends Object {
|
|||
$k = array_keys($value);
|
||||
$count = count($k);
|
||||
|
||||
if (is_numeric($k[0])) {
|
||||
if ($count > 0 && is_numeric($k[0])) {
|
||||
for ($i = 0; $count > $i; $i++) {
|
||||
foreach ($values[$i] as $key2 => $value1) {
|
||||
if ($value1 === '0' && !in_array($key2, $field[$newKey][$i])) {
|
||||
|
@ -627,7 +627,7 @@ class SecurityComponent extends Object {
|
|||
}
|
||||
}
|
||||
|
||||
if (!is_numeric($k[0])) {
|
||||
if ($count == 0 || !is_numeric($k[0])) {
|
||||
if (isset($field[$newKey])) {
|
||||
$field[$newKey] = array_merge($merge, $field[$newKey]);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue