X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0f74cdeda4c069bfbb9c4131ef1352f55b6f8499..4ea0dca21bda49aab5ccb91ec12bb4ef5924ed3e:/wp-includes/class-wp-post.php diff --git a/wp-includes/class-wp-post.php b/wp-includes/class-wp-post.php index c9669348..edaf149a 100644 --- a/wp-includes/class-wp-post.php +++ b/wp-includes/class-wp-post.php @@ -210,12 +210,11 @@ final class WP_Post { public static function get_instance( $post_id ) { global $wpdb; - if ( ! is_numeric( $post_id ) || $post_id != floor( $post_id ) || ! $post_id ) { + $post_id = (int) $post_id; + if ( ! $post_id ) { return false; } - $post_id = (int) $post_id; - $_post = wp_cache_get( $post_id, 'posts' ); if ( ! $_post ) {