diff --git a/wp-includes/rest-api/class-wp-rest-request.php b/wp-includes/rest-api/class-wp-rest-request.php index d9c24e0658..73548d4f38 100644 --- a/wp-includes/rest-api/class-wp-rest-request.php +++ b/wp-includes/rest-api/class-wp-rest-request.php @@ -408,7 +408,7 @@ class WP_REST_Request implements ArrayAccess { $order = $this->get_parameter_order(); foreach ( $order as $type ) { - if ( array_key_exists( $key, $this->params[ $type ] ) ) { + if ( is_array( $this->params[ $type ] ) && array_key_exists( $key, $this->params[ $type ] ) ) { return true; } } @@ -433,7 +433,7 @@ class WP_REST_Request implements ArrayAccess { $found_key = false; foreach ( $order as $type ) { - if ( 'defaults' !== $type && array_key_exists( $key, $this->params[ $type ] ) ) { + if ( 'defaults' !== $type && is_array( $this->params[ $type ] ) && array_key_exists( $key, $this->params[ $type ] ) ) { $this->params[ $type ][ $key ] = $value; $found_key = true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3de17a4911..7ea42a1b09 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta3-48641'; +$wp_version = '5.5-beta3-48642'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.