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

Props dkarfa, itowhid06, TimothyBlynJacobs.
Fixes #47965.

git-svn-id: https://develop.svn.wordpress.org/trunk@47372 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-02-25 19:33:22 +00:00
parent f852ca2cc1
commit 38e9142a66
4 changed files with 4 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ function wp_save_post_revision( $post_id ) {
$post_has_changed = false;
foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) {
if ( normalize_whitespace( $post->$field ) != normalize_whitespace( $last_revision->$field ) ) {
if ( normalize_whitespace( $post->$field ) !== normalize_whitespace( $last_revision->$field ) ) {
$post_has_changed = true;
break;
}