Avoid 'Only variables should be passed by reference' warnings. Props SergeyBiryukov. see #18975

git-svn-id: https://develop.svn.wordpress.org/trunk@19074 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2011-10-28 15:48:44 +00:00
parent d85938ec7a
commit 722c6d7003
4 changed files with 8 additions and 4 deletions

View File

@@ -1386,7 +1386,8 @@ class wpdb {
// Return an array of row objects with keys from column 1
// (Duplicates are discarded)
foreach ( $this->last_result as $row ) {
$key = array_shift( $var_by_ref = get_object_vars( $row ) );
$var_by_ref = get_object_vars( $row );
$key = array_shift( $var_by_ref );
if ( ! isset( $new_array[ $key ] ) )
$new_array[ $key ] = $row;
}