From 69aa6b52ba4d81e8331fed88851a23f58addb56c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Aug 2019 15:03:33 +0000 Subject: [PATCH] Taxonomy: Correct some strict comparisons after [45710]. See #47573. git-svn-id: https://develop.svn.wordpress.org/trunk@45711 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 1894e3284f..e6c4332fbb 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1770,7 +1770,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) { $defaults = array(); if ( 'category' === $taxonomy ) { - $defaults['default'] = get_option( 'default_category' ); + $defaults['default'] = (int) get_option( 'default_category' ); if ( $defaults['default'] === $term ) { return 0; // Don't delete the default category } @@ -3541,7 +3541,7 @@ function _get_term_children( $term_id, $terms, $taxonomy, &$ancestors = array() continue; } - if ( $term->parent === $term_id ) { + if ( (int) $term->parent === $term_id ) { if ( $use_id ) { $term_list[] = $term->term_id; } else {