Skip to content

Commit 30e6860

Browse files
committed
Fix fatal error on revisions with post meta of type array
1 parent 9956c86 commit 30e6860

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( $post->$field ) !== normalize_whitespace( $latest_revision->$field ) ) {
190+
if ( normalize_whitespace( serialize( $post->$field ) ) !== normalize_whitespace( serialize( $latest_revision->$field ) ) ) {
191191
$post_has_changed = true;
192192
break;
193193
}

0 commit comments

Comments
 (0)