Adding magic method fix for null query values (Ticket #1999), and adding PostgreSQL boolean quoting patch (Ticket #1788)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4396 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-02 02:21:44 +00:00
parent 8f7add9c29
commit 75d8f42684

View file

@ -126,7 +126,7 @@ class DboSource extends DataSource {
$out[$keys[$i]] = $this->value($data[$keys[$i]]);
}
return $out;
} elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'))) {
} elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
return $data;
} else {
return null;
@ -216,7 +216,7 @@ class DboSource extends DataSource {
$c = 0;
$query = array();
foreach ($field as $f) {
if (!is_array($params[$c])) {
if (!is_array($params[$c]) && !empty($params[$c])) {
$query[$args[2]->name . '.' . $f] = '= ' . $params[$c];
} else {
$query[$args[2]->name . '.' . $f] = $params[$c];