mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Applying optimization to Controller::postConditions from 'robustsolution' Fixes #287
This commit is contained in:
parent
2e0acbf505
commit
5aba143620
1 changed files with 2 additions and 1 deletions
|
@ -895,11 +895,12 @@ class Controller extends Object {
|
|||
$op = '';
|
||||
}
|
||||
|
||||
$arrayOp = is_array($op);
|
||||
foreach ($data as $model => $fields) {
|
||||
foreach ($fields as $field => $value) {
|
||||
$key = $model.'.'.$field;
|
||||
$fieldOp = $op;
|
||||
if (is_array($op)) {
|
||||
if ($arrayOp) {
|
||||
if (array_key_exists($key, $op)) {
|
||||
$fieldOp = $op[$key];
|
||||
} elseif (array_key_exists($field, $op)) {
|
||||
|
|
Loading…
Reference in a new issue