X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/ef91a7f4f3c6468973e192335a27ec0e0faca0b5..HEAD:/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 ) {