Fatal error to exception on Membership BAO
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 6 Mar 2019 11:47:43 +0000 (11:47 +0000)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 6 Mar 2019 11:47:43 +0000 (11:47 +0000)
CRM/Member/BAO/Membership.php

index cbc07cf2b641cbd3de5d1ba6675fc8eb6cd78bfe..b1a287c1f19a9930ef477e3137d881a531af69d4 100644 (file)
@@ -1160,10 +1160,8 @@ AND civicrm_membership.is_test = %2";
       $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;