diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index a7c5bce481..b5b5e308b5 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -985,7 +985,7 @@ function get_attachment_fields_to_edit($post, $errors = null) { $t['args'] = array(); $terms = get_object_term_cache($post->ID, $taxonomy); - if ( empty($terms) ) + if ( false === $terms ) $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); $values = array(); diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 5dcce3a3c2..794cb0ee80 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -3111,7 +3111,7 @@ function get_the_taxonomies($post = 0, $args = array() ) { $t['template'] = $template; $terms = get_object_term_cache($post->ID, $taxonomy); - if ( empty($terms) ) + if ( false === $terms ) $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); $links = array(); @@ -3161,7 +3161,7 @@ function is_object_in_term( $object_id, $taxonomy, $terms = null ) { return new WP_Error( 'invalid_object', __( 'Invalid object ID' ) ); $object_terms = get_object_term_cache( $object_id, $taxonomy ); - if ( empty( $object_terms ) ) + if ( false === $terms ) $object_terms = wp_get_object_terms( $object_id, $taxonomy ); if ( is_wp_error( $object_terms ) )