From f078bc70e3e4f599cbb45c2087692d5980b9e82e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 31 Jul 2016 19:47:31 -0700 Subject: [PATCH] CRM-18472 - CRM_Contact_BAO_GroupContact - Remove erroneous references 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 | 2 +- CRM/Contact/Page/View/UserDashBoard/GroupContact.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php index 3c7eaa6eda..c25192a2b1 100644 --- a/CRM/Contact/BAO/GroupContact.php +++ b/CRM/Contact/BAO/GroupContact.php @@ -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)) { diff --git a/CRM/Contact/Page/View/UserDashBoard/GroupContact.php b/CRM/Contact/Page/View/UserDashBoard/GroupContact.php index 730030e4e5..605a32f1ab 100644 --- a/CRM/Contact/Page/View/UserDashBoard/GroupContact.php +++ b/CRM/Contact/Page/View/UserDashBoard/GroupContact.php @@ -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, -- 2.25.1