From 872142744621058059693ae8a0c7dd28a9e26ac5 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 30 Sep 2011 21:35:05 +0000 Subject: [PATCH] Initialize the post object in get_default_post_to_edit(). props tech163. fixes #18049. git-svn-id: http://svn.automattic.com/wordpress/trunk@18847 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index cfcb2a33f9..8b163b39a9 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -424,6 +424,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) set_post_format( $post, get_option( 'default_post_format' ) ); } else { + $post = new stdClass; $post->ID = 0; $post->post_author = ''; $post->post_date = '';