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
This commit is contained in:
parent
8951af8ebb
commit
779788d8d6
|
@ -429,7 +429,7 @@ class WP_Term_Query {
|
||||||
foreach ( $exclude_tree as $extrunk ) {
|
foreach ( $exclude_tree as $extrunk ) {
|
||||||
$excluded_children = array_merge(
|
$excluded_children = array_merge(
|
||||||
$excluded_children,
|
$excluded_children,
|
||||||
(array) get_terms( $taxonomies[0], array(
|
(array) get_terms( reset( $taxonomies ), array(
|
||||||
'child_of' => intval( $extrunk ),
|
'child_of' => intval( $extrunk ),
|
||||||
'fields' => 'ids',
|
'fields' => 'ids',
|
||||||
'hide_empty' => 0
|
'hide_empty' => 0
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue