diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php
index 36ff320..ca164f1 100644
--- a/wp-includes/canonical.php
+++ b/wp-includes/canonical.php
@@ -665,7 +665,11 @@ 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' ) ) ) {
+				$where .= " AND post_type IN ('" . implode( "', '", 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 ) ) ) . "')";
 		}
