diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 4ecad8e808..e0888653b3 100644
--- src/wp-includes/functions.php
+++ src/wp-includes/functions.php
@@ -7066,7 +7066,7 @@ function wp_checkdate( $month, $day, $year, $source_date ) {
 	 * @param bool   $checkdate   Whether the given date is valid.
 	 * @param string $source_date Date to check.
 	 */
-	return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );
+	return apply_filters( 'wp_checkdate', checkdate( intval( $month ), intval( $day ), intval( $year ) ), $source_date );
 }
 
 /**
diff --git src/wp-includes/post.php src/wp-includes/post.php
index 4ceb8dd3a6..cb17ab504d 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -4912,16 +4912,24 @@ function wp_resolve_post_date( $post_date = '', $post_date_gmt = '' ) {
 		}
 	}
 
-	// Validate the date.
-	$month = substr( $post_date, 5, 2 );
-	$day   = substr( $post_date, 8, 2 );
-	$year  = substr( $post_date, 0, 4 );
+	// Ensure we have a valid mysql-formatted date string (YYYY-MM-DD).
+	if ( 10 === strlen( $post_date ) ) {
+		preg_match( "/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/", $post_date, $matches );
+	} else {
+		// Validate any other attempts at the (YYYY-MM-DD H:i:s) or ISO formats.
+		preg_match( "/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(?:\s|T)(?:[0-1][0-9]|2[1-3]):[0-5][0-9]:[0-5][0-9]/", $post_date, $matches );
+	}
+
+	if ( empty( $matches ) || ! is_array( $matches ) || count( $matches ) < 4 ) {
+		return false;
+	}
 
-	$valid_date = wp_checkdate( $month, $day, $year, $post_date );
+	$valid_date = wp_checkdate( $matches[2], $matches[3], $matches[1], $post_date );
 
 	if ( ! $valid_date ) {
 		return false;
 	}
+
 	return $post_date;
 }
 
diff --git tests/phpunit/tests/post.php tests/phpunit/tests/post.php
index 108e6ef4a6..ed77658c2d 100644
--- tests/phpunit/tests/post.php
+++ tests/phpunit/tests/post.php
@@ -1220,6 +1220,25 @@ class Tests_Post extends WP_UnitTestCase {
 		$this->assertSame( $post['post_date_gmt'], $out->post_date_gmt );
 	}
 
+	/**
+	 * @ticket 26798
+	 *
+	 * On a deeper level, this is handled by test_wp_resolve_post_date.
+	 */
+	public function test_wp_insert_post_reject_malformed_post_date() {
+		$post = array(
+			'post_author'   => self::$editor_id,
+			'post_status'   => 'publish',
+			'post_content'  => 'content',
+			'post_title'    => 'title',
+			'post_date'     => '2012-01-8',
+		);
+
+		// Inserting the post should fail gracefully.
+		$id = wp_insert_post( $post );
+		$this->assertSame( 0, $id );
+	}
+
 	public function test_wp_delete_post_reassign_hierarchical_post_type() {
 		$grandparent_page_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
 		$parent_page_id      = self::factory()->post->create(
@@ -1639,6 +1658,93 @@ class Tests_Post extends WP_UnitTestCase {
 		$this->assertFalse( $resolved_post_date );
 	}
 
+	/**
+	 * @ticket 26798
+	 *
+	 * @dataProvider data_wp_resolve_post_date_regex
+	 *
+	 * Tests the regex inside of wp_resolve_post_date().
+	 */
+	public function test_wp_resolve_post_date_regex( $date, $expected ) {
+		$out = wp_resolve_post_date( $date );
+		$this->assertEquals( $out, $expected );
+	}
+
+	public function data_wp_resolve_post_date_regex() {
+		return array(
+			array(
+				'2012-01-01',
+				'2012-01-01',
+			),
+			array(
+				'2012-01-01 00:00:00',
+				'2012-01-01 00:00:00',
+			),
+			array(
+				'2016-01-16T00:00:00Z',
+				'2016-01-16T00:00:00Z',
+			),
+			array(
+				'2016-01-16T00:0',
+				false,
+			),
+			array(
+				'2012-01-01 0',
+				false,
+			),
+			array(
+				'2012-01-01 00:00',
+				false,
+			),
+			array(
+				'2012-01-01 25:00:00',
+				false,
+			),
+			array(
+				'2012-01-01 00:60:00',
+				false,
+			),
+			array(
+				'2012-01-01 00:00:60',
+				false,
+			),
+			array(
+				'201-01-08 00:00:00',
+				false,
+			),
+			array(
+				'201a-01-08 00:00:00',
+				false,
+			),
+			array(
+				'2012-1-08 00:00:00',
+				false,
+			),
+			array(
+				'2012-31-08 00:00:00',
+				false,
+			),
+			array(
+				'2012-01-8 00:00:00',
+				false,
+			),
+			array(
+				'2012-01-48 00:00:00',
+				false,
+			),
+			// Ensure leap years are handled correctly.
+			array(
+				'2012-02-29',
+				'2012-02-29',
+			),
+			array(
+				'2011-02-29',
+				false,
+			),
+
+		);
+	}
+
 	/**
 	 * Ensure sticking a post updates the `sticky_posts` option.
 	 *
