From 6644845831c877ec6a1760a415e0f8ad60a5e94a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 21 Jun 2021 09:16:08 +1200 Subject: [PATCH] Deprecate guess work in processPriceSet Testing to see how much of this we can deprecate - line items should be 'complete' before reaching the processing function --- CRM/Price/BAO/LineItem.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index c2c707f7b0..6187654238 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -400,6 +400,9 @@ WHERE li.contribution_id = %1"; $line['entity_id'] = $entityId; } if (!empty($line['membership_type_id'])) { + if (($line['entity_table'] ?? '') !== 'civicrm_membership') { + CRM_Core_Error::deprecatedWarning('entity table should be already set'); + } $line['entity_table'] = 'civicrm_membership'; } if (!empty($contributionDetails->id)) { -- 2.25.1