Revisions: Check and return errors for insertions to revisions.

Fixes #30009.

Props rmccue, adamsilverstein, coreymckrill, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@51124 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock
2021-06-08 23:23:12 +00:00
parent 9f9261f051
commit 1eb777209d
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
$post = _wp_post_revision_data( $post, $autosave );
$post = wp_slash( $post ); // Since data is from DB.
$revision_id = wp_insert_post( $post );
$revision_id = wp_insert_post( $post, true );
if ( is_wp_error( $revision_id ) ) {
return $revision_id;
}