Make WordPress Core


Ignore:
Timestamp:
02/25/2020 07:33:22 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison for normalize_whitespace() checks when comparing revisions or autosaves.

Props dkarfa, itowhid06, TimothyBlynJacobs.
Fixes #47965.

File:
1 edited

Legend:

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

    r47219 r47372  
    163163
    164164            foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) {
    165                 if ( normalize_whitespace( $post->$field ) != normalize_whitespace( $last_revision->$field ) ) {
     165                if ( normalize_whitespace( $post->$field ) !== normalize_whitespace( $last_revision->$field ) ) {
    166166                    $post_has_changed = true;
    167167                    break;
Note: See TracChangeset for help on using the changeset viewer.