Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.6
-
Fix Version/s: 4.2.7
-
Component/s: CiviMember
-
Labels:None
Description
The deleteMembership function in CRM/Member/BAO/Membership.php has several Hard Coded activities types. If any of those activity types are not present then the delete fails.
Starting at (or about) line 580 the following change/patch eliminates that problem.
$params = array(
'source_record_id' => $membershipId,
'activity_type_id' => array(), // Removed Hard Coded Activity Types
);
$membershipActivities = array('Membership Signup','Membership Renewal','Change Membership Status','Change Membership Type','Membership Renewal Reminder');
foreach($membershipActivities AS $memAct)
{
$tId = array_search($memAct, $activityTypes);
if($tId !== false)
}
Sorry it's not really up to snuff... but it's a small snippet so I hope you'll forgive me.