diff --git a/includes/classes/NS_Post_Finder.php b/includes/classes/NS_Post_Finder.php index 514b2e1..e4d8537 100644 --- a/includes/classes/NS_Post_Finder.php +++ b/includes/classes/NS_Post_Finder.php @@ -505,7 +505,11 @@ public function search_posts() { // Sanitize tax_queries if ( isset( $_POST['tax_query'] ) ) { foreach ( $_POST['tax_query'] as $current_tax_query ) { - $args['tax_query'][] = array_map( 'sanitize_text_field', $current_tax_query ); + if ( is_array( $current_tax_query ) ) { + $args['tax_query'][] = array_map( 'sanitize_text_field', $current_tax_query ); + } else { + $args['tax_query'][] = sanitize_text_field( $current_tax_query ); + } } }