From 3a1178a2f544ae97e011b3860520813bd7f1455a Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 15 Aug 2020 22:41:25 -0400 Subject: [PATCH] element doesn't exist if there's no discounts set --- CRM/Event/Form/ManageEvent/Fee.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index 4ef63a3549..fa96e1a4f6 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -814,7 +814,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { $params['value'][$index] = CRM_Utils_Rule::cleanMoney(trim($value)); } } - foreach ($params['discounted_value'] as $index => $discountedValueSet) { + foreach ($params['discounted_value'] ?? [] as $index => $discountedValueSet) { foreach ($discountedValueSet as $innerIndex => $value) { if (CRM_Utils_System::isNull($value)) { unset($params['discounted_value'][$index][$innerIndex]); -- 2.25.1