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,15 @@ 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' ) ) ) {
+				$post_types = array();
+				foreach ( get_query_var( 'post_type' ) as $post_type ) {
+					$post_types[] = $wpdb->prepare( '%s', $post_type );
+				}
+				$where .= " AND post_type IN (" . implode( ", ", $post_types ) . ")";
+			} 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 ) ) ) . "')";
 		}
