mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
In wpdb::load_col_info()
, don't fetch the number of fields in the result row on each iteration of the for
loop. It can be stored in a var and referenced.
See #32444. Built from https://develop.svn.wordpress.org/trunk@32515 git-svn-id: http://core.svn.wordpress.org/trunk@32485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a2e976501
commit
45d897d0e7
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32514';
|
||||
$wp_version = '4.3-alpha-32515';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -2893,11 +2893,13 @@ class wpdb {
|
||||
return;
|
||||
|
||||
if ( $this->use_mysqli ) {
|
||||
for ( $i = 0; $i < @mysqli_num_fields( $this->result ); $i++ ) {
|
||||
$num_fields = @mysqli_num_fields( $this->result );
|
||||
for ( $i = 0; $i < $num_fields; $i++ ) {
|
||||
$this->col_info[ $i ] = @mysqli_fetch_field( $this->result );
|
||||
}
|
||||
} else {
|
||||
for ( $i = 0; $i < @mysql_num_fields( $this->result ); $i++ ) {
|
||||
$num_fields = @mysql_num_fields( $this->result );
|
||||
for ( $i = 0; $i < $num_fields; $i++ ) {
|
||||
$this->col_info[ $i ] = @mysql_fetch_field( $this->result, $i );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user