From 779788d8d622e78a9be8831265e06c4b0f014a55 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 23 Jun 2017 02:06:42 +0000 Subject: [PATCH] When querying for terms, do not assume that `$taxonomies` is a 0-indexed array. In [25108], the logic of term queries was modified to avoid assuming that the `taxonomies` array was numerically indexed. See #23506. This fix was inadvertantly reverted during the refactor in [25162]. Props david.binda. Fixes #41113. Built from https://develop.svn.wordpress.org/trunk@40924 git-svn-id: http://core.svn.wordpress.org/trunk@40774 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-term-query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index 2f3da47301..376f1b94fd 100644 --- a/wp-includes/class-wp-term-query.php +++ b/wp-includes/class-wp-term-query.php @@ -429,7 +429,7 @@ class WP_Term_Query { foreach ( $exclude_tree as $extrunk ) { $excluded_children = array_merge( $excluded_children, - (array) get_terms( $taxonomies[0], array( + (array) get_terms( reset( $taxonomies ), array( 'child_of' => intval( $extrunk ), 'fields' => 'ids', 'hide_empty' => 0 diff --git a/wp-includes/version.php b/wp-includes/version.php index 001172f72b..22b73cc145 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-40923'; +$wp_version = '4.9-alpha-40924'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.