Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:Developer Doc
-
Funding Source:Needs Funding
-
Verified?:No
Description
CRM_Utils_Token::replaceGreetingTokens() operates by reference, modifying the first parameter. Other methods for token replacement in this class return the modified string.
This leads to inconsistency in how these methods must be applied.
There seem to be quite a few pass-by-reference parameters in this class which might not need to be pass-by-reference? (eg replaceContributionTokens() which passes by ref through a couple of functions to CRM_Utils_Array::retrieveValueRecursive(), but doesn't seem to be actually doing anything with that `&` ...