Ticket #20850: 20850.patch
File 20850.patch, 1.1 KB (added by , 13 years ago) |
---|
-
wp-includes/taxonomy.php
1479 1479 if ( '' === $slug = sanitize_title($term) ) 1480 1480 return 0; 1481 1481 1482 $where = 't. slug =%s';1483 $else_where = 't. name= %s';1484 $where_fields = array($ slug);1485 $else_where_fields = array($ term);1482 $where = 't.name LIKE BINARY %s'; 1483 $else_where = 't.slug = %s'; 1484 $where_fields = array($term); 1485 $else_where_fields = array($slug); 1486 1486 if ( !empty($taxonomy) ) { 1487 1487 $parent = (int) $parent; 1488 1488 if ( $parent > 0 ) { … … 2056 2056 } 2057 2057 } 2058 2058 2059 if ( $term_id = term_exists($ slug) ) {2059 if ( $term_id = term_exists($name) ) { 2060 2060 $existing_term = $wpdb->get_row( $wpdb->prepare( "SELECT name FROM $wpdb->terms WHERE term_id = %d", $term_id), ARRAY_A ); 2061 2061 // We've got an existing term in the same taxonomy, which matches the name of the new term: 2062 2062 if ( is_taxonomy_hierarchical($taxonomy) && $existing_term['name'] == $name && $exists = term_exists( (int) $term_id, $taxonomy ) ) {