Notice fix in membership_online_receipt
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 4 Dec 2023 01:32:27 +0000 (14:32 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 4 Dec 2023 01:38:44 +0000 (14:38 +1300)
CRM/Financial/BAO/Order.php

index fc2d59e61cd5f01522fbbd2306e0dbc6f40ad352..48ece1b8c3a10a16c26b33c851ce93c1c028d375 100644 (file)
@@ -953,7 +953,8 @@ class CRM_Financial_BAO_Order {
       elseif ($taxRate) {
         $lineItem['tax_amount'] = ($taxRate / 100) * $lineItem['line_total'];
       }
-      if (!empty($lineItem['membership_type_id'])) {
+      $lineItem['membership_type_id'] = $lineItem['membership_type_id'] ?? NULL;
+      if ($lineItem['membership_type_id']) {
         $lineItem['entity_table'] = 'civicrm_membership';
       }
       $lineItem['title'] = $this->getLineItemTitle($lineItem);