From 9b8a0d22b0d11e9363acfe5006920ee8eb1676f2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 20 Aug 2023 00:08:49 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-admin/includes/meta-boxes.php`. Follow-up to [38], [647], [2890], [3570], [11815], [11816], [31550], [52620]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56420 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/meta-boxes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 7d0e1def8b..0584a2edc4 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -1033,7 +1033,7 @@ function page_attributes_meta_box( $post ) { endif; // End empty pages check. endif; // End hierarchical check. - if ( count( get_page_templates( $post ) ) > 0 && get_option( 'page_for_posts' ) != $post->ID ) : + if ( count( get_page_templates( $post ) ) > 0 && (int) get_option( 'page_for_posts' ) !== $post->ID ) : $template = ! empty( $post->page_template ) ? $post->page_template : false; ?>

@@ -1496,7 +1496,7 @@ function link_advanced_meta_box( $link ) { link_rating ) && $link->link_rating == $rating ) { + if ( isset( $link->link_rating ) && $link->link_rating === $rating ) { echo ' selected="selected"'; } echo '>' . $rating . '';