From 072b0f2128ee847bee69029d97e9d44a55ce3f72 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 12 Sep 2013 05:09:09 +0000 Subject: [PATCH] Use `reset()` to access the first element of an array, don't assume there is an item at index `0`. See #25282. Built from https://develop.svn.wordpress.org/trunk@25384 git-svn-id: http://core.svn.wordpress.org/trunk@25323 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index fe2bee4430..44d9dfb476 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1238,7 +1238,7 @@ function get_terms($taxonomies, $args = '') { $args = wp_parse_args( $args, $defaults ); $args['number'] = absint( $args['number'] ); $args['offset'] = absint( $args['offset'] ); - if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) || + if ( !$single_taxonomy || ! is_taxonomy_hierarchical( reset( $taxonomies ) ) || '' !== $args['parent'] ) { $args['child_of'] = 0; $args['hierarchical'] = false;