[wp-trac] [WordPress Trac] #42122: Problem in $wpdb->insert
WordPress Trac
noreply at wordpress.org
Fri Oct 6 17:20:12 UTC 2017
#42122: Problem in $wpdb->insert
--------------------------+-----------------------------
Reporter: tazotodua | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
in `includes/wp-db.php`, line 1976, there is:
{{{
$data = $this->process_fields( $table, $data, $format );
if ( false === $data ) {
return false;
}
}}}
so, when using $wpdb->insert commands in plugins, sometimes we get
'false', without knowing an error. at least, that line should set i.e.
$wpdb->last_error = 'array not processed',
and then we could have an idea why `insert` returned false. what's more,
such query is not registered with `->last_query` and it even deteriorates
the debuging of error. have spent 3 hours to find out why my plugin's
`insert` didnt work...
please, enrich that area.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42122>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list