Skip to content

Commit 016bbec

Browse files
Coding Standards: Use strict comparison in _reset_front_page_settings_for_post().
Follow-up to [6337], [25686]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59572 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7bd6835 commit 016bbec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/post.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3859,11 +3859,11 @@ function _reset_front_page_settings_for_post( $post_id ) {
38593859
* If the page is defined in option page_on_front or post_for_posts,
38603860
* adjust the corresponding options.
38613861
*/
3862-
if ( get_option( 'page_on_front' ) == $post->ID ) {
3862+
if ( (int) get_option( 'page_on_front' ) === $post->ID ) {
38633863
update_option( 'show_on_front', 'posts' );
38643864
update_option( 'page_on_front', 0 );
38653865
}
3866-
if ( get_option( 'page_for_posts' ) == $post->ID ) {
3866+
if ( (int) get_option( 'page_for_posts' ) === $post->ID ) {
38673867
update_option( 'page_for_posts', 0 );
38683868
}
38693869
}

0 commit comments

Comments
 (0)