From a751618173ad44b97dd6222ea4aa4214c42cb995 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Thu, 7 Mar 2013 12:43:52 -0800 Subject: [PATCH] fix CRM-12051 --- CRM/Contact/BAO/Query.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 6e4fef7a41..689a180d66 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1590,11 +1590,16 @@ class CRM_Contact_BAO_Query { } // check for both id and contact_id if ($this->_params[$id][0] == 'id' || $this->_params[$id][0] == 'contact_id') { - if ($this->_params[$id][1] == 'IS NULL' || + if ( + $this->_params[$id][1] == 'IS NULL' || $this->_params[$id][1] == 'IS NOT NULL' ) { $this->_where[0][] = "contact_a.id {$this->_params[$id][1]}"; } + elseif (is_array($this->_params[$id][2])) { + $idList = implode("','", $this->_params[$id][2]); + $this->_where[0][] = "contact_a.id IN ({$idList})"; + } else { $this->_where[0][] = "contact_a.id {$this->_params[$id][1]} {$this->_params[$id][2]}"; } -- 2.25.1