Merge similar error strings for invalid data.

props pavelevap.
fixes #32329.

git-svn-id: https://develop.svn.wordpress.org/trunk@32477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2015-05-09 21:08:57 +00:00
parent bcbae1cee3
commit cfa32bc1d7
3 changed files with 7 additions and 7 deletions

View File

@@ -260,7 +260,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
$post = get_post($post, ARRAY_A);
if ( ! $post || empty($post['ID']) )
return new WP_Error( 'invalid_post', __( 'Invalid post ID' ) );
return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) );
if ( isset($post['post_type']) && 'revision' == $post['post_type'] )
return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );