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:
parent
1facff5425
commit
e4bfbcd9c1
|
@ -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 ) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue