mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing issue with empty $conditions
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3442 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
fe3522c305
commit
cb87dfc71d
1 changed files with 3 additions and 0 deletions
|
@ -1310,6 +1310,9 @@ class DboSource extends DataSource {
|
||||||
} else {
|
} else {
|
||||||
$clause = ' WHERE ';
|
$clause = ' WHERE ';
|
||||||
$out = $this->conditionKeysToString($conditions);
|
$out = $this->conditionKeysToString($conditions);
|
||||||
|
if (empty($out)) {
|
||||||
|
return $clause . ' (1 = 1)';
|
||||||
|
}
|
||||||
return $clause . ' (' . join(') AND (', $out) . ')';
|
return $clause . ' (' . join(') AND (', $out) . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue