diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index cc491a87dd..ea40f9e454 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2233,7 +2233,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { ); $args = wp_parse_args( $args, $defaults ); - if ( $args['parent'] > 0 && ! term_exists( (int) $args['parent'] ) ) { + if ( (int) $args['parent'] > 0 && ! term_exists( (int) $args['parent'] ) ) { return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) ); } @@ -3001,7 +3001,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) { return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) ); } - if ( $parsed_args['parent'] > 0 && ! term_exists( (int) $parsed_args['parent'] ) ) { + if ( (int) $parsed_args['parent'] > 0 && ! term_exists( (int) $parsed_args['parent'] ) ) { return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) ); }