[wp-trac] [WordPress Trac] #3544: MySQL Errors not ignored from other resources

WordPress Trac noreply at wordpress.org
Mon Feb 12 05:59:31 UTC 2024


#3544: MySQL Errors not ignored from other resources
--------------------------+---------------------
 Reporter:  jgough        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  2.1
Component:  General       |     Version:  2.0.6
 Severity:  minor         |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by larionzlnuj3):

 In wp-db.php, the mysql_error() function is called without arguments,
 which means that errors from other database resources are detected and
 reported, causing confusion. A simple fix is to change this to
 mysql_error($this->dbh) to only report WordPress errors. I've attached a
 patch to address this issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/3544#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list