diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 993056ff2c..fb737f9a62 100644
a
|
b
|
function wp_untrash_post( $post_id = 0 ) { |
3859 | 3859 | delete_post_meta( $post_id, '_wp_trash_meta_status' ); |
3860 | 3860 | delete_post_meta( $post_id, '_wp_trash_meta_time' ); |
3861 | 3861 | |
3862 | | $post_updated = wp_update_post( |
3863 | | array( |
3864 | | 'ID' => $post_id, |
3865 | | 'post_status' => $post_status, |
3866 | | ) |
| 3862 | $args = array( |
| 3863 | 'ID' => $post_id, |
| 3864 | 'post_status' => $post_status, |
3867 | 3865 | ); |
3868 | 3866 | |
| 3867 | $post_author_id = get_post_field( 'post_author', $post_id ); |
| 3868 | |
| 3869 | if ( !( (bool) get_user_by( 'id', $post_author_id ) ) ) { |
| 3870 | $args['post_author'] = get_current_user_id(); |
| 3871 | } |
| 3872 | |
| 3873 | $post_updated = wp_update_post( $args ); |
| 3874 | |
3869 | 3875 | if ( ! $post_updated ) { |
3870 | 3876 | return false; |
3871 | 3877 | } |