Avoid an unexpected object error when syncing global terms

Pass the expected single value, rather than object, when recursively calling `global_terms()`.

Props hauvong.

See #31914, Fixes #31149.


git-svn-id: https://develop.svn.wordpress.org/trunk@32064 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2015-04-07 04:13:04 +00:00
parent 38f0420e12
commit babd623e15
1 changed files with 1 additions and 1 deletions

View File

@ -1801,7 +1801,7 @@ function global_terms( $term_id, $deprecated = '' ) {
$global_id = $wpdb->insert_id;
}
} elseif ( $global_id != $term_id ) {
$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
$local_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
if ( null != $local_id ) {
global_terms( $local_id );
if ( 10 < $global_terms_recurse ) {