From 8ede5d21d3225b7480f0bc578e94a472ba1c3e3c Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 29 Oct 2008 06:44:15 +0000 Subject: [PATCH] Removing unreachable code git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7793 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo_source.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index aae008b59..c246af620 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1728,10 +1728,9 @@ class DboSource extends DataSource { } if (is_array($conditions) && !empty($conditions)) { - if (!empty($conditions)) { - $out = $this->conditionKeysToString($conditions, $quoteValues, $model); - } - if (empty($out) || empty($conditions)) { + $out = $this->conditionKeysToString($conditions, $quoteValues, $model); + + if (empty($out)) { return $clause . ' 1 = 1'; } return $clause . join(' AND ', $out); @@ -1785,7 +1784,6 @@ class DboSource extends DataSource { } else { $key = $join; } - $value = $this->conditionKeysToString($value, $quoteValues, $model); if (strpos($join, 'NOT') !== false) {