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:
nate 2006-08-30 16:00:20 +00:00
parent fe3522c305
commit cb87dfc71d

View file

@ -1310,6 +1310,9 @@ class DboSource extends DataSource {
} else {
$clause = ' WHERE ';
$out = $this->conditionKeysToString($conditions);
if (empty($out)) {
return $clause . ' (1 = 1)';
}
return $clause . ' (' . join(') AND (', $out) . ')';
}
}