From 2a139cd3ca851cbb3c9bf417f5a384847d1e6065 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 16 Jan 2007 02:32:42 +0000 Subject: [PATCH] Pass resource to mysql_error. Props jgough. fixes #3544 git-svn-id: https://develop.svn.wordpress.org/trunk@4741 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index ee29753c2a..a267be093a 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -106,7 +106,7 @@ class wpdb { function print_error($str = '') { global $EZSQL_ERROR; - if (!$str) $str = mysql_error(); + if (!$str) $str = mysql_error($this->dbh); $EZSQL_ERROR[] = array ('query' => $this->last_query, 'error_str' => $str); @@ -174,7 +174,7 @@ class wpdb { $this->queries[] = array( $query, $this->timer_stop() ); // If there is an error then take note of it.. - if ( mysql_error() ) { + if ( mysql_error($this->dbh) ) { $this->print_error(); return false; }