Skip to content

Commit

Permalink
Fix: 0010329: Receive duplicate key on upgrade from 1.1.6 to 1.2.0a3 …
Browse files Browse the repository at this point in the history
…if existing categories exist with a leading or tailing space
  • Loading branch information
mantis committed Apr 19, 2009
1 parent 33d73b3 commit bdf2196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/install_functions.php
Expand Up @@ -58,7 +58,7 @@ function install_category_migrate() {
foreach( $t_data as $t_project_id => $t_categories ) {
$t_inserted = array();
foreach( $t_categories as $t_name => $t_true ) {
$t_lower_name = string_lower( $t_name );
$t_lower_name = string_lower( trim( $t_name ) );
if ( !isset( $t_inserted[$t_lower_name] ) ) {
$query = "INSERT INTO $t_category_table ( name, project_id ) VALUES ( " . db_param() . ', ' . db_param() . ' )';
db_query_bound( $query, array( $t_name, $t_project_id ) );
Expand Down

0 comments on commit bdf2196

Please sign in to comment.