diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 24a06bf20..96c1a197d 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -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) . ')'; } }