diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
index 1db44dc..6db0f20 100644
--- src/wp-includes/taxonomy.php
+++ src/wp-includes/taxonomy.php
@@ -3539,7 +3539,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
 			return new WP_Error('duplicate_term_slug', sprintf(__('The slug &#8220;%s&#8221; is already in use by another term'), $slug));
 	}
 
-	$tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );
+	$tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );
 
 	// Check whether this is a shared term that needs splitting.
 	$_term_id = _split_shared_term( $term_id, $tt_id );
diff --git tests/phpunit/tests/term/wpUpdateTerm.php tests/phpunit/tests/term/wpUpdateTerm.php
index 9213de5..47ec569 100644
--- tests/phpunit/tests/term/wpUpdateTerm.php
+++ tests/phpunit/tests/term/wpUpdateTerm.php
@@ -472,6 +472,22 @@ class Tests_Term_WpUpdateTerm extends WP_UnitTestCase {
 		$this->assertEquals( $term_by_id, $term_by_ttid );
 	}
 
+	/**
+	 * @ticket 32876
+	 */
+	public function test_wp_update_term_should_return_int_values_for_term_id_and_term_taxonomy_id() {
+		register_taxonomy( 'wptests_tax', 'post' );
+		$t = $this->factory->term->create( array(
+			'taxonomy' => 'wptests_tax',
+		) );
+		$found = wp_update_term( $t, 'wptests_tax', array(
+			'slug' => 'foo',
+		) );
+
+		$this->assertInternalType( 'int', $found['term_id'] );
+		$this->assertInternalType( 'int', $found['term_taxonomy_id'] );
+	}
+
 	public function test_wp_update_term_should_clean_object_term_cache() {
 		register_taxonomy( 'wptests_tax_for_post', 'post' );
 		register_taxonomy( 'wptests_tax_for_page', 'page' );
