diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index f903cb5aaf..c061fa6412 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -223,7 +223,7 @@ class WP_Terms_List_Table extends WP_List_Table { } $terms = get_terms( $taxonomy, $args ); - if ( empty( $terms ) ) { + if ( empty( $terms ) || ! is_array( $terms ) ) { echo ''; $this->no_items(); echo ''; @@ -239,7 +239,6 @@ class WP_Terms_List_Table extends WP_List_Table { // Some funky recursion to get the job done( Paging & parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake $this->_rows( $taxonomy, $terms, $children, $offset, $number, $count ); } else { - $terms = get_terms( $taxonomy, $args ); foreach ( $terms as $term ) { $this->single_row( $term ); }