From 798cd1e20b3eaa6bc35ff78e97b3361885f7530e Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Sun, 5 Jul 2020 00:17:54 +0000 Subject: [PATCH] REST API: Correct the return type of `rest_sanitize_value_from_schema`. Fixes #45486. Props birgire, Jean-David, mukesh27, priyankkpatel. git-svn-id: https://develop.svn.wordpress.org/trunk@48307 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rest-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 5fdf9530cb..c8435a1919 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -1718,7 +1718,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) { * @param mixed $value The value to sanitize. * @param array $args Schema array to use for sanitization. * @param string $param The parameter name, used in error messages. - * @return true|WP_Error + * @return mixed The sanitized value. */ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) { $allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' );