diff --git src/wp-includes/class-wp.php src/wp-includes/class-wp.php
index ce88c102cf..59a5fb4ca7 100644
--- src/wp-includes/class-wp.php
+++ src/wp-includes/class-wp.php
@@ -356,7 +356,14 @@ class WP {
 		// Convert urldecoded spaces back into '+'.
 		foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy => $t ) {
 			if ( $t->query_var && isset( $this->query_vars[ $t->query_var ] ) ) {
-				$this->query_vars[ $t->query_var ] = str_replace( ' ', '+', $this->query_vars[ $t->query_var ] );
+				// Query vars passed via REST API can be an array after r50157.
+				if ( is_string( $this->query_vars[ $t->query_var ] ) ) {
+					$this->query_vars[ $t->query_var ] = str_replace( ' ', '+', $this->query_vars[ $t->query_var ] );
+				} else if ( is_array( $this->query_vars[ $t->query_var ] ) && isset( $this->query_vars[ $t->query_var ]['terms'] ) && is_array( $this->query_vars[ $t->query_var ]['terms'] ) ) {
+					foreach ( $this->query_vars[ $t->query_var ]['terms'] as $key => $term ) {
+						$this->query_vars[ $t->query_var ]['terms'][ $key ] = str_replace( ' ', '+', $term );
+					}
+				}
 			}
 		}
 
