mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
8f7add9c29
commit
75d8f42684
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue