From 5ae1a0fe6b218972f615b7f3908200005c4ca107 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@8391 602fd350-edb4-49c9-b593-d223f7449a82 --- 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);