mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-30 16:36:59 +02:00
Pass resource to mysql_error. Props jgough. fixes #3544
git-svn-id: http://svn.automattic.com/wordpress/trunk@4741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a392e00fe
commit
7aa452938f
@ -106,7 +106,7 @@ class wpdb {
|
|||||||
|
|
||||||
function print_error($str = '') {
|
function print_error($str = '') {
|
||||||
global $EZSQL_ERROR;
|
global $EZSQL_ERROR;
|
||||||
if (!$str) $str = mysql_error();
|
if (!$str) $str = mysql_error($this->dbh);
|
||||||
$EZSQL_ERROR[] =
|
$EZSQL_ERROR[] =
|
||||||
array ('query' => $this->last_query, 'error_str' => $str);
|
array ('query' => $this->last_query, 'error_str' => $str);
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ class wpdb {
|
|||||||
$this->queries[] = array( $query, $this->timer_stop() );
|
$this->queries[] = array( $query, $this->timer_stop() );
|
||||||
|
|
||||||
// If there is an error then take note of it..
|
// If there is an error then take note of it..
|
||||||
if ( mysql_error() ) {
|
if ( mysql_error($this->dbh) ) {
|
||||||
$this->print_error();
|
$this->print_error();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user