Changeset 7431
- Timestamp:
- 03/20/2008 11:34:32 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r7130 r7431 765 765 766 766 if ( is_scalar($error_data) ) { 767 $response .= "<![CDATA[$ v]]>";767 $response .= "<![CDATA[$error_data]]>"; 768 768 } elseif ( is_array($error_data) ) { 769 769 foreach ( $error_data as $k => $v ) -
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 } -
trunk/wp-includes/wp-db.php
r7419 r7431 19 19 var $show_errors = false; 20 20 var $suppress_errors = false; 21 var $last_error = ''; 21 22 var $num_queries = 0; 22 23 var $last_query; … … 279 280 280 281 // If there is an error then take note of it.. 281 if ( mysql_error($this->dbh) ) {282 if ( $this->last_error = mysql_error($this->dbh) ) { 282 283 $this->print_error(); 283 284 return false;
Note: See TracChangeset
for help on using the changeset viewer.