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:
parent
d320f6f879
commit
0ef06f9569
@ -74,7 +74,9 @@ case 'editedcat':
|
|||||||
$location = $referer;
|
$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);
|
$location = add_query_arg('message', 3, $location);
|
||||||
else
|
else
|
||||||
$location = add_query_arg('message', 5, $location);
|
$location = add_query_arg('message', 5, $location);
|
||||||
|
Loading…
Reference in New Issue
Block a user