From 0f28809863ee6e1de7d9b0c083c64c092f3ac431 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 6 Jun 2016 14:20:50 -0600 Subject: [PATCH] CRM-18701 tidy up, stop setting an array key & use a variable. The array key is returned to the calling function but grepping did not find any more instances of it so we should limit it's scope to the function that uses it. Really we want to pass in as a non-reference or else it's too unpredictable but this is just a small step --- CRM/Price/BAO/PriceSet.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 93c205b674..ff934adf20 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -851,20 +851,20 @@ WHERE id = %1"; break; case 'CheckBox': - $params['amount_priceset_level_checkbox'] = $optionIds = array(); + $amount_price_set_level_checkbox = $optionIds = array(); foreach ($params["price_{$id}"] as $optionId => $option) { $optionIds[] = $optionId; $optionLabel = $field['options'][$optionId]['label']; - $params['amount_priceset_level_checkbox']["{$field['options'][$optionId]['id']}"] = $optionLabel; + $amount_price_set_level_checkbox["{$field['options'][$optionId]['id']}"] = $optionLabel; if (isset($checkboxLevel)) { $checkboxLevel = array_unique(array_merge( $checkboxLevel, - array_keys($params['amount_priceset_level_checkbox']) + array_keys($amount_price_set_level_checkbox) ) ); } else { - $checkboxLevel = array_keys($params['amount_priceset_level_checkbox']); + $checkboxLevel = array_keys($amount_price_set_level_checkbox); } } CRM_Price_BAO_LineItem::format($id, $params, $field, $lineItem); -- 2.25.1