X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0f74cdeda4c069bfbb9c4131ef1352f55b6f8499..4ea0dca21bda49aab5ccb91ec12bb4ef5924ed3e:/wp-includes/class-wp-term.php diff --git a/wp-includes/class-wp-term.php b/wp-includes/class-wp-term.php index 6cb4a15b..8eb87efb 100644 --- a/wp-includes/class-wp-term.php +++ b/wp-includes/class-wp-term.php @@ -125,12 +125,11 @@ final class WP_Term { public static function get_instance( $term_id, $taxonomy = null ) { global $wpdb; - if ( ! is_numeric( $term_id ) || $term_id != floor( $term_id ) || ! $term_id ) { + $term_id = (int) $term_id; + if ( ! $term_id ) { return false; } - $term_id = (int) $term_id; - $_term = wp_cache_get( $term_id, 'terms' ); // If there isn't a cached version, hit the database.