diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 6a74ac2d43..167b5cf562 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -895,7 +895,12 @@ function redirect_guess_404_permalink() { // If any of post_type, year, monthnum, or day are set, use them to refine the query. if ( get_query_var( 'post_type' ) ) { - $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); + if ( is_array( get_query_var( 'post_type' ) ) ) { + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare + $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')"; + } else { + $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); + } } else { $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6761fc8e36..d7c160dd9a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49199'; +$wp_version = '5.6-alpha-49200'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.