From babd623e1565451991cc709f8077964e2cead334 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 7 Apr 2015 04:13:04 +0000 Subject: [PATCH] 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 --- src/wp-includes/ms-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index a1b67a609d..6dbcf086d8 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -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 ) {