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

WordPress Trac noreply at wordpress.org
Fri Oct 28 01:10:11 UTC 2016


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

 * version:  4.2.1 =>


Comment:

 Replying to [comment:8 pento]:
 > I'm cool with adding an error message if this method fails, it'll make
 it into 4.7 if the patch is ready before November 15. I'm happy to provide
 feedback on any patches uploaded.

 And error message would be an excellent start for when there are syntax
 errors and such.  IMHO though, when the syntax is correct, the insert
 should perform the expected, truncate any entries that are too large for
 the field and perform the insert.  The only reason I stumbled on this bug
 is because I assumed that's what would happen, and didn't.

 Last_query should also show that the insert query was the last query
 attempted.

 I'd offer to help but I barely have time to play with plugins.

 Thanks!

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


More information about the wp-trac mailing list