From 3f6cbd33e1c746e23e381283d82b650481d1c1d6 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Wed, 6 Mar 2019 11:47:43 +0000 Subject: [PATCH] Fatal error to exception on Membership BAO --- CRM/Member/BAO/Membership.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index cbc07cf2b641..b1a287c1f19a 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1160,10 +1160,8 @@ public static function fixMembershipStatusBeforeRenew(&$currentMembership, $chan $currentMembership ); - if (empty($status) || - empty($status['id']) - ) { - CRM_Core_Error::fatal(ts('Oops, it looks like there is no valid membership status corresponding to the membership start and end dates for this membership. Contact the site administrator for assistance.')); + if (empty($status) || empty($status['id'])) { + throw new CRM_Core_Exception(ts('Oops, it looks like there is no valid membership status corresponding to the membership start and end dates for this membership. Contact the site administrator for assistance.')); } $currentMembership['today_date'] = $today;