Make WordPress Core

Ticket #20838: wpdb.patch

File wpdb.patch, 697 bytes (added by GrahamKelly, 13 years ago)
  • wp-includes/wp-db.php

     
    11151115                        // Return number of rows affected
    11161116                        $return_val = $this->rows_affected;
    11171117                } else {
    1118                         $i = 0;
    1119                         while ( $i < @mysql_num_fields( $this->result ) ) {
    1120                                 $this->col_info[$i] = @mysql_fetch_field( $this->result );
    1121                                 $i++;
     1118                        if (WP_DEBUG) {
     1119                                $i = 0;
     1120                                while ( $i < @mysql_num_fields( $this->result ) ) {
     1121                                        $this->col_info[$i] = @mysql_fetch_field( $this->result );
     1122                                        $i++;
     1123                                }
    11221124                        }
    11231125                        $num_rows = 0;
    11241126                        while ( $row = @mysql_fetch_object( $this->result ) ) {