Index: post.php
===================================================================
--- post.php	(revision 51846)
+++ post.php	(working copy)
@@ -4715,9 +4715,9 @@
 	}
 
 	// Validate the date.
-	$month = substr( $post_date, 5, 2 );
-	$day   = substr( $post_date, 8, 2 );
-	$year  = substr( $post_date, 0, 4 );
+	$month = (int)substr( $post_date, 5, 2 );
+	$day   = (int)substr( $post_date, 8, 2 );
+	$year  = (int)substr( $post_date, 0, 4 );
 
 	$valid_date = wp_checkdate( $month, $day, $year, $post_date );
 
