Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] remove instances of pass-by-reference where no change takes place #14693

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Further removal of an obsolete code pattern (after grepping)

Before

$params passed by reference

After

$params not passed by reference

Technical Details

I did a grep on these and the passed params are not altered - down with php4

Comments

@colemanw

I did a grep on these and the passed params are not altered - down with php4
@civibot
Copy link

civibot bot commented Jul 1, 2019

(Standard links)

@civibot civibot bot added the master label Jul 1, 2019
@eileenmcnaughton
Copy link
Contributor Author

test this please

@@ -295,7 +294,7 @@ public static function buildForeignKeySQL($params, $separator, $prefix, $tableNa
*
* @return bool
*/
public static function alterFieldSQL(&$params, $indexExist = FALSE, $triggerRebuild = TRUE) {
public static function alterFieldSQL($params, $indexExist = FALSE, $triggerRebuild = TRUE) {

// lets suppress the required flag, since that can cause sql issue
$params['required'] = FALSE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton do we need to carry forward this assignment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function that calls it (the only one) doesn't make use of the $params afterwards

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup make sense.

@monishdeb
Copy link
Member

Its a straightforward change and makes sense. Merging it now.

@monishdeb monishdeb merged commit 1d52cf0 into civicrm:master Jul 2, 2019
@eileenmcnaughton eileenmcnaughton deleted the cust_field_sql branch July 2, 2019 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants