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.

Built from https://develop.svn.wordpress.org/trunk@32064


git-svn-id: http://core.svn.wordpress.org/trunk@32043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2015-04-07 04:14:26 +00:00
parent 1facff5425
commit e4bfbcd9c1
2 changed files with 2 additions and 2 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 ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta4-32063';
$wp_version = '4.2-beta4-32064';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.