Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Applying optimization to Controller::postConditions from 'robustsolut…

…ion' Fixes #287
  • Loading branch information...
commit 5aba1436202baf820316432823609e823da6cbbf 1 parent 2e0acbf
@markstory markstory authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  cake/libs/controller/controller.php
View
3  cake/libs/controller/controller.php
@@ -895,11 +895,12 @@ function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive =
$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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.