From 515293b29d83e42239d700c68335eaf04d064517 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 7 Jun 2016 12:26:20 +0530 Subject: [PATCH] CRM-18554: Using IS EMPTY operator for some date fields crashes 4.7.7 ---------------------------------------- * CRM-18554: Using IS EMPTY operator for some date fields crashes 4.7.7 https://issues.civicrm.org/jira/browse/CRM-18554 --- CRM/Contact/BAO/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 537744ad75..91cfb0f614 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -5085,10 +5085,10 @@ SELECT COUNT( conts.total_amount ) as cancel_count, } if ($date) { - $this->_where[$grouping][] = "{$tableName}.{$dbFieldName} $op $date"; + $this->_where[$grouping][] = self::buildClause("{$tableName}.{$dbFieldName}", $op, $date); } else { - $this->_where[$grouping][] = "{$tableName}.{$dbFieldName} $op"; + $this->_where[$grouping][] = self::buildClause("{$tableName}.{$dbFieldName}", $op); } $this->_tables[$tableName] = $this->_whereTables[$tableName] = 1; -- 2.25.1