Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 21501)
+++ wp-includes/post.php	(working copy)
@@ -2812,8 +2812,10 @@
  * @return null Nothing is returned. Which can mean that no action is required or post was published.
  */
 function check_and_publish_future_post($post_id) {
-
+	global $post;
 	$post = get_post($post_id);
+	global $post_id;
+	$post_id = $post->ID;
 
 	if ( empty($post) )
 		return;
