X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e3ff8f35458a959c1879c0a4976701ed8dcfe651..aaf6ab9705b7f76e8b7d3a69f6fd52c173b6b3b8:/wp-includes/class-wp-comment.php diff --git a/wp-includes/class-wp-comment.php b/wp-includes/class-wp-comment.php index 80ef9bb1..0e9f88a3 100644 --- a/wp-includes/class-wp-comment.php +++ b/wp-includes/class-wp-comment.php @@ -191,12 +191,11 @@ final class WP_Comment { public static function get_instance( $id ) { global $wpdb; - if ( ! is_numeric( $id ) || $id != floor( $id ) || ! $id ) { + $comment_id = (int) $id; + if ( ! $comment_id ) { return false; } - $comment_id = (int) $id; - $_comment = wp_cache_get( $comment_id, 'comment' ); if ( ! $_comment ) {