diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
index 12864b343a..9f84855257 100644
|
|
function wp_insert_term( $term, $taxonomy, $args = array() ) { |
2276 | 2276 | 'term_taxonomy_id' => $tt_id, |
2277 | 2277 | ); |
2278 | 2278 | } |
2279 | | $wpdb->insert( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ) + array( 'count' => 0 ) ); |
| 2279 | |
| 2280 | if ( false === $wpdb->insert( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ) + array( 'count' => 0 ) ) ) { |
| 2281 | return new WP_Error( 'db_insert_error', __( 'Could not insert term taxonomy into the database.' ), $wpdb->last_error ); |
| 2282 | } |
| 2283 | |
2280 | 2284 | $tt_id = (int) $wpdb->insert_id; |
2281 | 2285 | |
2282 | 2286 | /* |