mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 03:22:39 +00:00
Little optimization in postConditions of controller.
Signed-off-by: Mark Story <mark@mark-story.com>
This commit is contained in:
parent
1c0c1bc9c7
commit
1cef0ac981
1 changed files with 8 additions and 6 deletions
|
@ -899,12 +899,14 @@ class Controller extends Object {
|
|||
foreach ($fields as $field => $value) {
|
||||
$key = $model.'.'.$field;
|
||||
$fieldOp = $op;
|
||||
if (is_array($op) && array_key_exists($key, $op)) {
|
||||
$fieldOp = $op[$key];
|
||||
} elseif (is_array($op) && array_key_exists($field, $op)) {
|
||||
$fieldOp = $op[$field];
|
||||
} elseif (is_array($op)) {
|
||||
$fieldOp = false;
|
||||
if (is_array($op)) {
|
||||
if (array_key_exists($key, $op)) {
|
||||
$fieldOp = $op[$key];
|
||||
} elseif (array_key_exists($field, $op)) {
|
||||
$fieldOp = $op[$field];
|
||||
} else {
|
||||
$fieldOp = false;
|
||||
}
|
||||
}
|
||||
if ($exclusive && $fieldOp === false) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue