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

WordPress Trac noreply at wordpress.org
Fri Nov 19 18:58:29 UTC 2021


#32315: $wpdb->insert fails without error msg
---------------------------------------------+-----------------------------
 Reporter:  dlt101                           |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.9
Component:  Database                         |     Version:  4.2.1
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52218" 52218]:
 {{{
 #!CommitTicketReference repository="" revision="52218"
 WPDB: Call `wp_load_translations_early()` in `wpdb::query()` and
 `wpdb::process_fields()`.

 For consistency and simplification, replaces the `function_exists( '__' )`
 checks with `wp_load_translations_early()` to make sure i18n functions are
 available. This change removes the extra code introduced in [52176] for
 using non-translated error messages when `__()` is not available.

 Improves the plural versions of the error messages.

 For performance, when there are more than one problem field, uses
 `reset()` to populate the field in the error message.

 Follow-up to [52176], [52195].

 Props sergeybiryukov, hellofromTonya.
 Fixes #32315.
 }}}

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


More information about the wp-trac mailing list