CRM-15851 search builder fix for custom date fields
authorBrian Shaughnessy <brian@lcdservices.biz>
Wed, 21 Jan 2015 03:37:54 +0000 (22:37 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Wed, 21 Jan 2015 03:37:54 +0000 (22:37 -0500)
CRM/Core/BAO/CustomQuery.php

index 9c475f826a790bdaf20569c91bcfb9b48d12201a..0e549c1d67e5608318b843bbbdb2ed184f4a6caa 100644 (file)
@@ -482,7 +482,7 @@ SELECT label, value
             $toValue = CRM_Utils_Array::value('to', $value);
 
             if (!$fromValue && !$toValue) {
-              if (!CRM_Utils_Date::processDate($value) && $op != 'IS NULL' && $op != 'IS NOT NULL') {
+              if (!CRM_Utils_Date::processDate($value) && !in_array($op, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {
                 continue;
               }