element doesn't exist if there's no discounts set
authordemeritcowboy <demeritcowboy@hotmail.com>
Sun, 16 Aug 2020 02:41:25 +0000 (22:41 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Sun, 16 Aug 2020 02:41:25 +0000 (22:41 -0400)
CRM/Event/Form/ManageEvent/Fee.php

index 4ef63a35499b38a458be93c0dc529e5db40e19cd..fa96e1a4f6c4a7f304124294eafb68d50ca18cb5 100644 (file)
@@ -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]);