Revisions: Check and return errors for insertions to revisions.

Fixes #30009.

Props rmccue, adamsilverstein, coreymckrill, whyisjake.

Built from https://develop.svn.wordpress.org/trunk@51124


git-svn-id: http://core.svn.wordpress.org/trunk@50733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2021-06-08 23:24:57 +00:00
parent 38e4f333c0
commit 011a598fa1
2 changed files with 2 additions and 2 deletions

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;
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51123';
$wp_version = '5.8-alpha-51124';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.