diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php index cc1c302b9c..55fe1ad63a 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php @@ -395,7 +395,7 @@ class WP_REST_Search_Controller extends WP_REST_Controller { protected function get_search_handler( $request ) { $type = $request->get_param( self::PROP_TYPE ); - if ( ! $type || ! isset( $this->search_handlers[ $type ] ) ) { + if ( ! $type || ! is_string( $type ) || ! isset( $this->search_handlers[ $type ] ) ) { return new WP_Error( 'rest_search_invalid_type', __( 'Invalid type parameter.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 8e0e62e1c4..206923364c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57836'; +$wp_version = '6.6-alpha-57839'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.