summaryrefslogtreecommitdiffstats
path: root/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:22 +0000
commitfc0a79914946dac00ccd51b1aacffe267de7210e (patch)
tree1403384efbfe8f8776ff60aaa40f7d535c02c822 /wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php
parentReleasing progress-linux version 6.5.5+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.tar.xz
wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.zip
Merging upstream version 6.6.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php2
1 files changed, 1 insertions, 1 deletions
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 cc1c302..55fe1ad 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.' ),