diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index cbdfea2a8..cea8a8b87 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1562,6 +1562,9 @@ function wp_update_term( $term, $taxonomy, $args = array() ) { // First, get all of the original args $term = get_term ($term_id, $taxonomy, ARRAY_A); + if ( is_wp_error( $term ) ) + return $term; + // Escape data pulled from DB. $term = add_magic_quotes($term);