Make WordPress Core

Changeset 59565


Ignore:
Timestamp:
12/29/2024 09:52:34 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in sanitize_post().

Follow-up to [12062].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59161 r59565  
    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        }
     
    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        }
Note: See TracChangeset for help on using the changeset viewer.