From cb87dfc71d659cff50369df594e71770bbb32fa2 Mon Sep 17 00:00:00 2001 From: nate Date: Wed, 30 Aug 2006 16:00:20 +0000 Subject: [PATCH] Fixing issue with empty $conditions git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3442 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo_source.php | 3 +++ 1 file changed, 3 insertions(+) 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) . ')'; } }