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
This commit is contained in:
Timothy Jacobs 2020-07-05 00:17:54 +00:00
parent 205eb1abc9
commit 798cd1e20b

View File

@ -1718,7 +1718,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
* @param mixed $value The value to sanitize. * @param mixed $value The value to sanitize.
* @param array $args Schema array to use for sanitization. * @param array $args Schema array to use for sanitization.
* @param string $param The parameter name, used in error messages. * @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 = '' ) { function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
$allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' ); $allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' );