id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 17646 wp_get_object_terms should return arrays of integers for IDs and tt_IDs simonwheatley wonderboymusic "Currently when you use ```wp_get_object_terms``` to request an array of IDs or tt_IDs, the array returned contains strings representing the IDs, not integers. This then creates issues if you send the values back into ```wp_set_object_terms``` as it creates terms named as per those strings, rather than associating the term_ids as expected. Code to prove the issue: {{{ $term_ids = wp_get_object_terms( get_the_ID(), 'category', array( 'fields' => 'tt_ids' ) ); var_dump( $term_ids ); }}} Results in: {{{ array 0 => string '1' (length=1) 1 => string '5' (length=1) }}} I believe that the array should have all values cast to integers before they are returned. The attached patch does this by mapping a created function to utilise ```(int)``` for the desired result." defect (bug) closed normal 3.8 Taxonomy 3.2 normal fixed has-patch early