From 51cf77d4cc6fd763d03eb98d9e9a48c4d0315117 Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 22 Jan 2007 19:21:21 +0000 Subject: [PATCH] Fixing issue with conditional values being empty arrays in DboSource::conditionKeysToString() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4319 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo_source.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 93c0e1bc5..af6374e31 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1382,7 +1382,7 @@ class DboSource extends DataSource { } } elseif(is_numeric($key)) { $data = ' ' . $value; - } elseif($value === null) { + } elseif($value === null || (is_array($value) && empty($value))) { $data = $this->name($key) . ' IS NULL'; } elseif($value === '') { $data = $this->name($key) . " = ''";