Do not pass by reference for createRelatedMemberships
authoreileen <emcnaughton@wikimedia.org>
Mon, 24 Aug 2020 01:11:07 +0000 (13:11 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 24 Aug 2020 01:11:07 +0000 (13:11 +1200)
commit33933a494b56291090a65c97fb1b8657acc922ef
tree93894e03febe07ee3324b08fe911bf02c845025d
parentf8682b5cfa7d5c0ed9fe2eb15ef488226c74e17e
Do not pass by reference for createRelatedMemberships

There are 2 parameters passed by reference to this function
1) dao - this is not altered
2) params - this IS altered but the calling function (create) does not use it again. While it's
possible a function that calls create uses it again the idea that they would want the params
to have been altered to refer to a different related relationship does not seem probable.

Tests on this are in JobTest & apiv3_MembershipTest
CRM/Member/BAO/Membership.php