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:
parent
7a8e0e3917
commit
5ae1a0fe6b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user