diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index d3316b0eab..6f44ccefe5 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -930,14 +930,13 @@ function get_category_feed_link( $cat, $feed = '' ) { */ function get_term_feed_link( $term, $taxonomy = '', $feed = '' ) { if ( ! is_object( $term ) ) { - $term = (int) $term; - $taxonomy = 'category'; - } elseif ( ! $term instanceof WP_Term ) { - $taxonomy = $term->taxonomy; + $term = (int) $term; } $term = get_term( $term, $taxonomy ); + $taxonomy = $term->taxonomy; + if ( empty( $term ) || is_wp_error( $term ) ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index f0486610ee..140c8b8d90 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52254'; +$wp_version = '5.9-alpha-52255'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.