Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.6, 4.0.6
-
Fix Version/s: 4.1.0
-
Component/s: CiviContribute, CiviMember
-
Labels:None
Description
Unrelated Membership details are being added to contribution receipts when they are generated off a contribution search. The details come from the first membership record in the database.
Reason is that
CRM_Contribute_Form_Task_Status::getDetails
used to return an integer for members. Now it returns an array with an empty value for the key [0]. This causes $baseIPN LoadData to load the first available membership. Patch below is a very safe fix & this functionality is currently completely broken.
Index: CRM/Core/Payment/BaseIPN.php
===================================================================
— CRM/Core/Payment/BaseIPN.php (revision 36620)
+++ CRM/Core/Payment/BaseIPN.php (working copy)
@@ -143,6 +143,7 @@
if (is_array($ids['membership'])) {
foreach ( $ids['membership'] as $id ) {
+ if(!empty($id)){
$membership = new CRM_Member_DAO_Membership( );
$membership->id = $id;
if ( ! $membership->find( true ) )
+ }
}
}