Add is_wp_error check

git-svn-id: http://svn.automattic.com/wordpress/trunk@6295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-10-28 21:33:03 +00:00
parent b4cdc4435d
commit b906aa0e86
1 changed files with 3 additions and 0 deletions

View File

@ -884,6 +884,9 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
if ( ! $ids = is_term($term, $taxonomy) ) if ( ! $ids = is_term($term, $taxonomy) )
return false; return false;
if ( is_wp_error( $ids ) )
return $ids;
$tt_id = $ids['term_taxonomy_id']; $tt_id = $ids['term_taxonomy_id'];
$defaults = array(); $defaults = array();