From be45c8b4a86fb6cb2e590f9a7f39211498251b3f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 10 Jun 2014 02:10:19 +1200 Subject: [PATCH] CRM-14824 fix intemittant bug on priceset processing --- CRM/Price/BAO/PriceSet.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 1c4ed9675a..621f2aac28 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -658,9 +658,10 @@ WHERE id = %1"; switch ($field['html_type']) { case 'Text': - $params["price_{$id}"] = array(key($field['options']) => $params["price_{$id}"]); + $firstOption = reset($field['options']); + $params["price_{$id}"] = array($firstOption['id'] => $params["price_{$id}"]); CRM_Price_BAO_LineItem::format($id, $params, $field, $lineItem); - $totalPrice += $lineItem[key($field['options'])]['line_total']; + $totalPrice += $lineItem[$firstOption['id']]['line_total']; break; case 'Radio': -- 2.25.1