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
This commit is contained in:
nacin 2011-09-30 21:35:05 +00:00
parent d7a17b96e9
commit 8721427446

View File

@ -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 = '';