From 9c7f357029bd7526b30ddfe993f1c3afe4e7373d Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sat, 17 Nov 2012 12:39:08 +0100 Subject: [PATCH] Check if bool operators in find conditions are empty. --- lib/Cake/Model/Datasource/DboSource.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 623b7a01f..f4fe7d777 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -2464,6 +2464,10 @@ class DboSource extends DataSource { $not = 'NOT '; } + if (empty($value)) { + continue; + } + if (empty($value[1])) { if ($not) { $out[] = $not . '(' . $value[0] . ')';