Check if error. Props simonwheatley. fixes #9345
git-svn-id: http://svn.automattic.com/wordpress/trunk@10803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
21e5ac6f83
commit
4f130b5e47
|
@ -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