From 0ef06f9569bc2d3baaf20502c48e04ba51b905a6 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 21 Jul 2008 17:52:19 +0000 Subject: [PATCH] Check for WP_Error return from wp_update_term(). Props scohoust. fixes #7366 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@8391 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/link-category.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/link-category.php b/wp-admin/link-category.php index bafb73f8ec..ea6479138a 100644 --- a/wp-admin/link-category.php +++ b/wp-admin/link-category.php @@ -74,7 +74,9 @@ case 'editedcat': $location = $referer; } - if ( wp_update_term($cat_ID, 'link_category', $_POST) ) + $update = wp_update_term($cat_ID, 'link_category', $_POST); + + if ( $update && !is_wp_error($update) ) $location = add_query_arg('message', 3, $location); else $location = add_query_arg('message', 5, $location);