From 4dae6777c0d90960ec006ae3f6c20702b1482c22 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 7 Dec 2010 07:12:55 +0000 Subject: [PATCH] Move [14551] to after the is_wp_error check. see #13133, fixes #15511, props alexdunae. git-svn-id: http://svn.automattic.com/wordpress/trunk@16761 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 1fb464ffcb..e445c1e0d4 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -156,10 +156,10 @@ function edit_post( $post_data = null ) { } $post_data = _wp_translate_postdata( true, $post_data ); - if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] ) - $post_data['post_status'] = 'draft'; if ( is_wp_error($post_data) ) wp_die( $post_data->get_error_message() ); + if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] ) + $post_data['post_status'] = 'draft'; if ( isset($post_data['visibility']) ) { switch ( $post_data['visibility'] ) {