From: Brian Shaughnessy Date: Wed, 21 Jan 2015 03:37:54 +0000 (-0500) Subject: CRM-15851 search builder fix for custom date fields X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1f87870bb34ae5f4b0fcb46366059e5d0372f4f7;p=civicrm-core.git CRM-15851 search builder fix for custom date fields --- diff --git a/CRM/Core/BAO/CustomQuery.php b/CRM/Core/BAO/CustomQuery.php index 9c475f826a..0e549c1d67 100644 --- a/CRM/Core/BAO/CustomQuery.php +++ b/CRM/Core/BAO/CustomQuery.php @@ -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; }