CRM-13633 - Undefined property in CRM Mailing Event
authorDonald A. Lobo <lobo@civicrm.org>
Tue, 22 Oct 2013 21:10:10 +0000 (14:10 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Tue, 22 Oct 2013 21:10:10 +0000 (14:10 -0700)
http://issues.civicrm.org/jira/browse/CRM-13633

CRM/Mailing/Event/BAO/Confirm.php

index 7366d9ac4dc347f2e812367e3088c2fc1c6e6342..427216996af26d2ecc3284cc968b448bdc8ccbcf 100644 (file)
@@ -71,7 +71,12 @@ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
     $details = CRM_Contact_BAO_GroupContact::getMembershipDetail($contact_id, $se->group_id);
     if ($details && $details->status == 'Added') {
       // This contact is already subscribed
-      return $details->title;
+      // lets return the group title
+      return CRM_Core_DAO::getFieldValue(
+        'CRM_Contact_DAO_Group',
+        $se->group_id,
+        'title'
+      );
     }
 
     $transaction = new CRM_Core_Transaction();