@@ -2652,7 +2652,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
26522652
26532653 // Seems unreachable. However, is used in the case that a term name is provided, which sanitizes to an empty string.
26542654 if ( empty ( $ slug ) ) {
2655- $ slug = sanitize_title ( $ slug , $ term_id );
2655+ $ slug = sanitize_title ( $ slug , ( string ) $ term_id );
26562656
26572657 /** This action is documented in wp-includes/taxonomy.php */
26582658 do_action ( 'edit_terms ' , $ term_id , $ taxonomy );
@@ -3425,7 +3425,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
34253425 $ wpdb ->update ( $ wpdb ->terms , $ data , compact ( 'term_id ' ) );
34263426
34273427 if ( empty ( $ slug ) ) {
3428- $ slug = sanitize_title ( $ name , $ term_id );
3428+ $ slug = sanitize_title ( $ name , ( string ) $ term_id );
34293429 $ wpdb ->update ( $ wpdb ->terms , compact ( 'slug ' ), compact ( 'term_id ' ) );
34303430 }
34313431
@@ -3572,7 +3572,7 @@ function wp_defer_term_counting( $defer = null ) {
35723572 $ _defer = $ defer ;
35733573 // Flush any deferred counts.
35743574 if ( ! $ defer ) {
3575- wp_update_term_count ( null , null , true );
3575+ wp_update_term_count ( 0 , '' , true );
35763576 }
35773577 }
35783578
0 commit comments