WordPress.org

Make WordPress Core

Ticket #22115: 22115.patch

File 22115.patch, 766 bytes (added by SergeyBiryukov, 2 years ago)
  • wp-includes/wp-db.php

     
    11951195                $this->result = @mysql_query( $query, $this->dbh ); 
    11961196                $this->num_queries++; 
    11971197 
     1198                $this->last_error = mysql_error( $this->dbh ); 
     1199 
    11981200                if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) 
    1199                         $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); 
     1201                        $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller(), $this->last_error ); 
    12001202 
    12011203                // If there is an error then take note of it.. 
    1202                 if ( $this->last_error = mysql_error( $this->dbh ) ) { 
     1204                if ( $this->last_error ) { 
    12031205                        $this->print_error(); 
    12041206                        return false; 
    12051207                }