mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user