From 011a598fa1317d3f4012b6a773cc7cbdbc448c67 Mon Sep 17 00:00:00 2001 From: whyisjake Date: Tue, 8 Jun 2021 23:24:57 +0000 Subject: [PATCH] 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 --- wp-includes/revision.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/revision.php b/wp-includes/revision.php index 5a090aaf58..630a06d23a 100644 --- a/wp-includes/revision.php +++ b/wp-includes/revision.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1949a317a6..268ba3b3ba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.