Skip to content

Commit

Permalink
Remove unnecessary assignment by reference
Browse files Browse the repository at this point in the history
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
dregad committed Oct 28, 2013
1 parent de607de commit 513c5e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions admin/install.php
Expand Up @@ -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() );
}
Expand Down Expand Up @@ -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() );
}
Expand Down Expand Up @@ -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 );
}
}

Expand All @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 513c5e8

Please sign in to comment.