Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 1.9
-
Fix Version/s: 2.0
-
Component/s: None
-
Labels:None
Description
The crm_create_contact_membership function in the Membership API gets related contacts by calling checkMembershipRelationship in CRM/Member/BAO/Membership. checkMembershipRelationship returns an associative array of ContactID => status. This causes Membership API to use the STATUS as the CONTACTID (OOPS).
Easy to fix though.
change:
foreach ( $relatedContacts as $contactId ) {
in the crm_create_contact_membership function (line 380 or so), to:
foreach ( $relatedContacts as $contactId => $status ) {
should now work as expected.