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
This commit is contained in:
Ryan Boren 2008-07-21 17:52:19 +00:00
parent 7a8e0e3917
commit 5ae1a0fe6b

View File

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