Katie Horn has submitted this change and it was merged.
Change subject: Empty payment method info is now a non-fatal error
......................................................................
Empty payment method info is now a non-fatal error
These messages should be rejected until we can fix them, rather than
taking down the pipeline with "CIVI_CONFIG" fatal errors.
Change-Id: Iebede0cdc2b00baeeef24f15eedd05cd509bb67c
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Katie Horn: Looks good to me, approved
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 218ff04..8fec874 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1087,6 +1087,10 @@
if ( empty( $msg['contribution_type_id'] ) ) {
if ( empty( $msg['contribution_type'] ) ) {
$msg['contribution_type'] =
wmf_civicrm_get_message_contribution_type( $msg );
+
+ if ( !$msg['contribution_type'] ) {
+ throw new WmfException( 'INVALID_MESSAGE', 'No contribution
type specified' );
+ }
}
$msg['contribution_type_id'] = wmf_civicrm_get_civi_id(
'contribution_type_id', $msg['contribution_type'] );
}
@@ -1094,6 +1098,10 @@
if ( empty( $msg['payment_instrument_id'] ) ) {
if ( empty( $msg['payment_instrument'] ) ) {
$msg['payment_instrument'] =
wmf_civicrm_get_message_payment_instrument( $msg );
+
+ if ( !$msg['payment_instrument'] ) {
+ throw new WmfException( 'INVALID_MESSAGE', 'No payment
instrument specified' );
+ }
}
$msg['payment_instrument_id'] = wmf_civicrm_get_civi_id(
'payment_instrument_id', $msg['payment_instrument'] );
}
--
To view, visit https://gerrit.wikimedia.org/r/147707
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iebede0cdc2b00baeeef24f15eedd05cd509bb67c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits