diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 6a0af16a8b..ad271c2ab8 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -4945,9 +4945,9 @@ 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 ); + $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 );