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:
parent
38f0420e12
commit
babd623e15
|
@ -1801,7 +1801,7 @@ function global_terms( $term_id, $deprecated = '' ) {
|
||||||
$global_id = $wpdb->insert_id;
|
$global_id = $wpdb->insert_id;
|
||||||
}
|
}
|
||||||
} elseif ( $global_id != $term_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 ) {
|
if ( null != $local_id ) {
|
||||||
global_terms( $local_id );
|
global_terms( $local_id );
|
||||||
if ( 10 < $global_terms_recurse ) {
|
if ( 10 < $global_terms_recurse ) {
|
||||||
|
|
Loading…
Reference in New Issue