WordPress.org

Make WordPress Core

Ticket #10536: wordpress-patch.diff

File wordpress-patch.diff, 463 bytes (added by AaronAsAChimp, 5 years ago)

check if the result is valid for passing to mysql_fetch_field(), etc.

  • wp-includes/wp-db.php

     
    695695                        } 
    696696                        // Return number of rows affected 
    697697                        $return_val = $this->rows_affected; 
    698                 } else { 
     698                } else if(!is_bool($this->result)) { 
    699699                        $i = 0; 
    700700                        while ($i < @mysql_num_fields($this->result)) { 
    701701                                $this->col_info[$i] = @mysql_fetch_field($this->result);