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:
Ryan Boren 2009-03-17 16:42:21 +00:00
parent dce7bff2eb
commit fc7b52bb1a
1 changed files with 3 additions and 0 deletions

View File

@ -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);