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
This commit is contained in:
nate 2007-01-27 17:48:48 +00:00
parent 8307f2bc85
commit 4f794248af

View file

@ -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) {