[wp-trac] [WordPress Trac] #32315: $wpdb->insert fails without error msg

WordPress Trac noreply at wordpress.org
Thu Oct 27 17:19:32 UTC 2016


#32315: $wpdb->insert fails without error msg
--------------------------+------------------------------
 Reporter:  dlt101        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  4.6.1
 Severity:  critical      |  Resolution:  invalid
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by datainterlock):

 * keywords:   => needs-patch
 * status:  new => closed
 * version:   => 4.6.1
 * resolution:   => invalid
 * severity:  major => critical


Comment:

 Confirmed.  It still exists in 4.6.1 after a year and a half!  I just
 spent HOURS trying to figure out why my database was being flooded with
 bad data after trying to get a $wpdb->insert_id and having it return false
 without any sql error.  The insert fails with no error or record produced.
 $wpdb->last_query shows the query BEFORE the insert and $wpdb->last_error
 is empty.

 Bumping this to critical as having a truncated insert is one thing. Having
 no error produced after a failed insert is just unconscionable.

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


More information about the wp-trac mailing list