| @@ -162,14 +162,9 @@ | ||
| 162 | 162 | $this->copy_object_terms( $object_id, $tr_id, $lang, $terms, $taxonomy, $append ); |
| 163 | 163 | } else { |
| 164 | 164 | // No permission to synchronize, so let's synchronize in reverse order |
| 165 | 165 | $orig_lang = array_search( $object_id, $tr_ids ); |
| 166 | - $tr_terms = get_the_terms( $tr_id, $taxonomy ); | |
| 167 | - | |
| 168 | - if ( false === $tr_terms ) { | |
| 169 | - $tr_terms = array(); | |
| 170 | - } | |
| 171 | - | |
| 166 | + $tr_terms = (array) get_the_terms( $tr_id, $taxonomy ); | |
| 172 | 167 | if ( is_array( $tr_terms ) ) { |
| 173 | 168 | $tr_terms = wp_list_pluck( $tr_terms, 'term_id' ); |
| 174 | 169 | $this->copy_object_terms( $tr_id, $object_id, $orig_lang, $tr_terms, $taxonomy, $append ); |
| 175 | 170 | } |