Skip to content

Commit 4e1752d

Browse files
Coding Standards: Use strict comparison in sanitize_post().
Follow-up to [12062]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59565 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4a6b12b commit 4e1752d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,7 @@ function is_sticky( $post_id = 0 ) {
28232823
function sanitize_post( $post, $context = 'display' ) {
28242824
if ( is_object( $post ) ) {
28252825
// Check if post already filtered for this context.
2826-
if ( isset( $post->filter ) && $context == $post->filter ) {
2826+
if ( isset( $post->filter ) && $context === $post->filter ) {
28272827
return $post;
28282828
}
28292829
if ( ! isset( $post->ID ) ) {
@@ -2835,7 +2835,7 @@ function sanitize_post( $post, $context = 'display' ) {
28352835
$post->filter = $context;
28362836
} elseif ( is_array( $post ) ) {
28372837
// Check if post already filtered for this context.
2838-
if ( isset( $post['filter'] ) && $context == $post['filter'] ) {
2838+
if ( isset( $post['filter'] ) && $context === $post['filter'] ) {
28392839
return $post;
28402840
}
28412841
if ( ! isset( $post['ID'] ) ) {

0 commit comments

Comments
 (0)