Skip to content

Commit 2786262

Browse files
LAPSrjwestonruter
andauthored
use maybe_serialize
Co-authored-by: Weston Ruter <[email protected]>
1 parent 30e6860 commit 2786262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/revision.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function wp_save_post_revision( $post_id ) {
187187
$post_has_changed = false;
188188

189189
foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) {
190-
if ( normalize_whitespace( serialize( $post->$field ) ) !== normalize_whitespace( serialize( $latest_revision->$field ) ) ) {
190+
if ( normalize_whitespace( maybe_serialize( $post->$field ) ) !== normalize_whitespace( maybe_serialize( $latest_revision->$field ) ) ) {
191191
$post_has_changed = true;
192192
break;
193193
}

0 commit comments

Comments
 (0)