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:
ryan 2009-03-17 16:42:21 +00:00
parent 21e5ac6f83
commit 4f130b5e47
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);