[wp-trac] [WordPress Trac] #64523: _do_query needs exception processing in class-wpdb.php

WordPress Trac noreply at wordpress.org
Sat Jan 17 13:43:43 UTC 2026


#64523: _do_query needs exception processing in class-wpdb.php
--------------------------+------------------------------
 Reporter:  randem06      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  6.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by solankisoftware):

 * keywords:   => has-patch


Comment:

 I can reproduce this issue when mysqli exception mode is enabled.
 Wrapping $this->dbh->query() inside a try/catch in _do_query() prevents
 fatal errors and preserves expected wpdb behavior.

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


More information about the wp-trac mailing list