From aaf778c6a17954fa8a7e9be18009d39e7e606d39 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Jun 2023 11:14:53 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/category.php`. Follow-up to [3511], [4173], [5525]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55880 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/category.php b/src/wp-includes/category.php index 0c06c4c6ea..a97c2c963a 100644 --- a/src/wp-includes/category.php +++ b/src/wp-includes/category.php @@ -149,7 +149,8 @@ function get_category_by_path( $category_path, $full_match = true, $output = OBJ foreach ( $categories as $category ) { $path = '/' . $leaf_path; $curcategory = $category; - while ( ( 0 != $curcategory->parent ) && ( $curcategory->parent != $curcategory->term_id ) ) { + + while ( ( 0 !== $curcategory->parent ) && ( $curcategory->parent !== $curcategory->term_id ) ) { $curcategory = get_term( $curcategory->parent, 'category' ); if ( is_wp_error( $curcategory ) ) { @@ -159,7 +160,7 @@ function get_category_by_path( $category_path, $full_match = true, $output = OBJ $path = '/' . $curcategory->slug . $path; } - if ( $path == $full_path ) { + if ( $path === $full_path ) { $category = get_term( $category->term_id, 'category', $output ); _make_cat_compat( $category );