From 4f130b5e47dccc3797598db972e3af3c94a4b3bb Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 17 Mar 2009 16:42:21 +0000 Subject: [PATCH] Check if error. Props simonwheatley. fixes #9345 git-svn-id: http://svn.automattic.com/wordpress/trunk@10803 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 3 +++ 1 file changed, 3 insertions(+) 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);