diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index d704f5e161..e27b68676b 100644 --- a/wp-includes/class-wp-term-query.php +++ b/wp-includes/class-wp-term-query.php @@ -379,7 +379,12 @@ class WP_Term_Query { } if ( ! $in_hierarchy ) { - return array(); + if ( 'count' == $args['fields'] ) { + return 0; + } else { + $this->terms = array(); + return $this->terms; + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index ab75fbd103..06e9bccf6d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42208'; +$wp_version = '5.0-alpha-42209'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.