CRM-18472 - CRM_Contact_BAO_GroupContact - Remove erroneous references
authorTim Otten <totten@civicrm.org>
Mon, 1 Aug 2016 02:47:31 +0000 (19:47 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 1 Aug 2016 02:47:31 +0000 (19:47 -0700)
These lines are attempting to accept a return-value by reference, but the
function does not return by reference. In PHP 5.3+, this is effectively
not a reference; and in PHP 5.4+, it generates a warning. That leads
to test failures in CRM_Contact_BAO_ContactTest::testCreateProfileContact.

CRM/Contact/BAO/GroupContact.php
CRM/Contact/Page/View/UserDashBoard/GroupContact.php

index 3c7eaa6edaaa979bad463c24c1fcd925c211f32d..c25192a2b1fd547059b4012ee602a7bbf497b8a0 100644 (file)
@@ -528,7 +528,7 @@ SELECT    *
     }
 
     if ($contactId) {
-      $contactGroupList = &CRM_Contact_BAO_GroupContact::getContactGroup($contactId, 'Added',
+      $contactGroupList = CRM_Contact_BAO_GroupContact::getContactGroup($contactId, 'Added',
         NULL, FALSE, $ignorePermission
       );
       if (is_array($contactGroupList)) {
index 730030e4e5d7405e96cb0d1bcfe7bc7367f74a17..605a32f1abd3d377486e5d6c380ef64eb056afe9 100644 (file)
@@ -43,21 +43,21 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_
       $this->_onlyPublicGroups
     );
 
-    $in =& CRM_Contact_BAO_GroupContact::getContactGroup(
+    $in = CRM_Contact_BAO_GroupContact::getContactGroup(
       $this->_contactId,
       'Added',
       NULL, FALSE, TRUE,
       $this->_onlyPublicGroups
     );
 
-    $pending =& CRM_Contact_BAO_GroupContact::getContactGroup(
+    $pending = CRM_Contact_BAO_GroupContact::getContactGroup(
       $this->_contactId,
       'Pending',
       NULL, FALSE, TRUE,
       $this->_onlyPublicGroups
     );
 
-    $out =& CRM_Contact_BAO_GroupContact::getContactGroup(
+    $out = CRM_Contact_BAO_GroupContact::getContactGroup(
       $this->_contactId,
       'Removed',
       NULL, FALSE, TRUE,