From 4f794248af70041962a252b7addeeec8d00763e7 Mon Sep 17 00:00:00 2001
From: nate <nate@cakephp.org>
Date: Sat, 27 Jan 2007 17:48:48 +0000
Subject: [PATCH] Fixing magic method query generation for array condition
 values (Ticket #2008)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4340 3807eeeb-6ff5-0310-8944-8be069107fe0
---
 cake/libs/model/datasources/dbo_source.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php
index a6eaae097..bf50b3298 100644
--- a/cake/libs/model/datasources/dbo_source.php
+++ b/cake/libs/model/datasources/dbo_source.php
@@ -210,7 +210,12 @@ class DboSource extends DataSource {
 			$c = 0;
 			$query = array();
 			foreach ($field as $f) {
-				$query[$args[2]->name . '.' . $f] = '= ' . $params[$c++];
+				if (!is_array($params[$c])) {
+					$query[$args[2]->name . '.' . $f] = '= ' . $params[$c];
+				} else {
+					$query[$args[2]->name . '.' . $f] = $params[$c];
+				}
+				$c++;
 			}
 
 			if ($or) {