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
This commit is contained in:
ryan 2008-07-21 17:52:19 +00:00
parent d320f6f879
commit 0ef06f9569
1 changed files with 3 additions and 1 deletions

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