scripts.mit.edu
/
autoinstalls
/
wordpress.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WordPress 4.7.2
[autoinstalls/wordpress.git]
/
wp-includes
/
class-wp-term.php
diff --git
a/wp-includes/class-wp-term.php
b/wp-includes/class-wp-term.php
index 6cb4a15bd85c9d521cb83ded1e52d894d166e9ca..8eb87efbe03daf862b48688620dddcbc661058e2 100644
(file)
--- 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;
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;
}
return false;
}
- $term_id = (int) $term_id;
-
$_term = wp_cache_get( $term_id, 'terms' );
// If there isn't a cached version, hit the database.
$_term = wp_cache_get( $term_id, 'terms' );
// If there isn't a cached version, hit the database.