Make WordPress Core


Ignore:
Timestamp:
01/16/2007 02:32:42 AM (18 years ago)
Author:
ryan
Message:

Pass resource to mysql_error. Props jgough. fixes #3544

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r4738 r4741  
    107107    function print_error($str = '') {
    108108        global $EZSQL_ERROR;
    109         if (!$str) $str = mysql_error();
     109        if (!$str) $str = mysql_error($this->dbh);
    110110        $EZSQL_ERROR[] =
    111111        array ('query' => $this->last_query, 'error_str' => $str);
     
    175175
    176176        // If there is an error then take note of it..
    177         if ( mysql_error() ) {
     177        if ( mysql_error($this->dbh) ) {
    178178            $this->print_error();
    179179            return false;
Note: See TracChangeset for help on using the changeset viewer.