Skip to content
Browse files

Remove unnecessary assignment by reference

From dhx's list, most items are in fact not pass-by-references at all.
The list returned by the following command excludes obvious false
positives, and the remaining occurences are not pass-by-references
either.

$ git grep '&\$' |grep -vE "function|Binary|@param"

Fixes #10976
  • Loading branch information...
1 parent de607de commit 513c5e838b11e2db4ec3be0b912c266217515c1c @dregad dregad committed Oct 28, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 admin/install.php
View
14 admin/install.php
@@ -392,7 +392,7 @@ function InsertData( $p_table, $p_data ) {
$f_db_exists = true;
}
if( $f_db_type == 'db2' ) {
- $result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $result = $g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
print_test_result( BAD, true, 'set schema failed: ' . $g_db->errorMsg() );
}
@@ -424,7 +424,7 @@ function InsertData( $p_table, $p_data ) {
if( $t_result == true ) {
$t_db_open = true;
if( $f_db_type == 'db2' ) {
- $result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $result = $g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
print_test_result( BAD, true, 'set schema failed: ' . $g_db->errorMsg() );
}
@@ -735,7 +735,7 @@ function InsertData( $p_table, $p_data ) {
$t_result = false;
echo $g_db->errorMsg();
} else {
- $t_result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $t_result = $g_db->execute( 'set schema ' . $f_db_schema );
}
}
@@ -752,7 +752,7 @@ function InsertData( $p_table, $p_data ) {
$dict = NewDataDictionary( $g_db );
if( $f_db_type == 'db2' ) {
- $rs = &$g_db->Execute( "CREATE SCHEMA " . $f_db_schema );
+ $rs = $g_db->Execute( "CREATE SCHEMA " . $f_db_schema );
if( !$rs ) {
$t_result = false;
@@ -801,7 +801,7 @@ function InsertData( $p_table, $p_data ) {
$t_result = @$g_db->Connect( $f_hostname, $f_db_username, $f_db_password, $f_database_name );
if( $f_db_type == 'db2' ) {
- $result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $result = $g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
echo $g_db->errorMsg();
}
@@ -851,7 +851,7 @@ function InsertData( $p_table, $p_data ) {
}
if( $f_db_type == 'db2' ) {
- $result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $result = $g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
echo $g_db->errorMsg();
}
@@ -1125,7 +1125,7 @@ function InsertData( $p_table, $p_data ) {
}
if( $f_db_type == 'db2' ) {
- $result = &$g_db->execute( 'set schema ' . $f_db_schema );
+ $result = $g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
echo $g_db->errorMsg();
}

0 comments on commit 513c5e8

Please sign in to comment.
Something went wrong with that request. Please try again.