mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Make check more strict to respect existing queries
This commit is contained in:
parent
d6e45131ad
commit
c01525f2cc
1 changed files with 2 additions and 1 deletions
|
@ -438,8 +438,9 @@ class Mysql extends DboSource {
|
|||
$alias = $joins = false;
|
||||
}
|
||||
$complexConditions = false;
|
||||
$fields = array_keys($this->describe($model));
|
||||
foreach ((array)$conditions as $key => $value) {
|
||||
if (strpos($key, '.') !== false && strpos($key, $model->alias) === false) {
|
||||
if (strpos($key, $model->alias) === false && !in_array($key, $fields, true)) {
|
||||
$complexConditions = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue