Changeset 7431 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 03/20/2008 11:34:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r7430 r7431 1154 1154 if ( ! $term_id = is_term($slug) ) { 1155 1155 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) 1156 return new WP_Error('db_insert_error', __('Could not insert term into the database') );1156 return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error); 1157 1157 $term_id = (int) $wpdb->insert_id; 1158 1158 } else if ( is_taxonomy_hierarchical($taxonomy) && !empty($parent) ) { … … 1161 1161 $slug = wp_unique_term_slug($slug, (object) $args); 1162 1162 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) 1163 return new WP_Error('db_insert_error', __('Could not insert term into the database') );1163 return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error); 1164 1164 $term_id = (int) $wpdb->insert_id; 1165 1165 }
Note: See TracChangeset
for help on using the changeset viewer.