Taxonomy: When querying terms, ensure `$taxonomies` is an array.
This avoids PHP notices that otherwise arise when no `taxonomy` parameter is passed to `get_terms()` or `WP_Term_Query`. Props dlh. Fixes #39932. git-svn-id: https://develop.svn.wordpress.org/trunk@40147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5983e88ab1
commit
e3996719d3
|
@ -323,7 +323,7 @@ class WP_Term_Query {
|
||||||
*/
|
*/
|
||||||
do_action( 'pre_get_terms', $this );
|
do_action( 'pre_get_terms', $this );
|
||||||
|
|
||||||
$taxonomies = $args['taxonomy'];
|
$taxonomies = (array) $args['taxonomy'];
|
||||||
|
|
||||||
// Save queries by not crawling the tree in the case of multiple taxes or a flat tax.
|
// Save queries by not crawling the tree in the case of multiple taxes or a flat tax.
|
||||||
$has_hierarchical_tax = false;
|
$has_hierarchical_tax = false;
|
||||||
|
|
Loading…
Reference in New Issue