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
This commit is contained in:
parent
f2391051c7
commit
072b0f2128
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue