Check if error. Props simonwheatley. fixes #9345
git-svn-id: https://develop.svn.wordpress.org/trunk@10803 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dce7bff2eb
commit
fc7b52bb1a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user