Make WordPress Core


Ignore:
Timestamp:
04/22/2023 03:17:47 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where strtolower() is involved.

Follow-up to [649], [7736], [18821], [19444], [20886], [20893], [23303], [55642], [55652], [55653], [55654].

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

File:
1 edited

Legend:

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

    r55671 r55677  
    41954195        $check_name = sanitize_title( $post_name, '', 'old-save' );
    41964196
    4197         if ( $update && strtolower( urlencode( $post_name ) ) == $check_name && get_post_field( 'post_name', $post_id ) == $check_name ) {
     4197        if ( $update
     4198            && strtolower( urlencode( $post_name ) ) === $check_name
     4199            && get_post_field( 'post_name', $post_id ) === $check_name
     4200        ) {
    41984201            $post_name = $check_name;
    41994202        } else { // New post, or slug has changed.
Note: See TracChangeset for help on using the changeset viewer.