From 63794520df4a8b20e55dd629c2a9f5645b2df6b9 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 24 Apr 2018 11:40:10 +0530 Subject: [PATCH] core/issues/74 - 'Price Set Details for Event Participants' gives DB error if the price fields are disabled. --- CRM/Contact/Form/Search/Custom/PriceSet.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/PriceSet.php b/CRM/Contact/Form/Search/Custom/PriceSet.php index 327ddc88b9..86d6631495 100644 --- a/CRM/Contact/Form/Search/Custom/PriceSet.php +++ b/CRM/Contact/Form/Search/Custom/PriceSet.php @@ -146,12 +146,14 @@ ORDER BY c.id, l.price_field_value_id; foreach (array_keys($rows) as $participantID) { $values = implode(',', $rows[$participantID]); - $sql = " + if ($values) { + $sql = " UPDATE {$this->_tableName} SET $values WHERE participant_id = $participantID; "; - CRM_Core_DAO::executeQuery($sql); + CRM_Core_DAO::executeQuery($sql); + } } } -- 2.25.1