Skip to content

Commit b4769ec

Browse files
Update src/wp-includes/blocks.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent 293533a commit b4769ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wp-includes/blocks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2734,7 +2734,8 @@ function build_query_vars_from_query_block( $block, $page ) {
27342734
// This is the new format e.g. "taxQuery":{"include":{"category":[4]},"exclude":{"post_tag":[5]}}
27352735

27362736
// Helper function to build tax_query conditions from taxonomy terms.
2737-
$build_conditions = static function ( array $terms, string $operator = 'IN' ): array {
2737+
$build_conditions = static function ( $terms, string $operator = 'IN' ): array {
2738+
$terms = (array) $terms;
27382739
$conditions = array();
27392740
foreach ( $terms as $taxonomy => $tax_terms ) {
27402741
if ( ! empty( $tax_terms ) && is_taxonomy_viewable( $taxonomy ) ) {

0 commit comments

Comments
 (0)