Make WordPress Core

Ticket #45486: 454836.3.diff

File 454836.3.diff, 946 bytes (added by priyankkpatel, 5 years ago)

Patch for wp-includes/rest-api.php

  • src/wp-includes/rest-api.php

     src/wp-includes/rest-api.php | 9 ++++++++-
     1 file changed, 8 insertions(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
    index 1c73b97824..e94b24878e 100644
    a b function rest_validate_value_from_schema( $value, $args, $param = '' ) { 
    12761276 *
    12771277 * @param mixed $value The value to sanitize.
    12781278 * @param array $args  Schema array to use for sanitization.
    1279  * @return true|WP_Error
     1279 * @return WP_Error|array|int|float|boolean|string|mixed
     1280 *                      If response generated an error, WP_Error,
     1281 *                      If response is array , array,
     1282 *          If response is int number, int,
     1283 *          If response is float number, float,
     1284 *                      If response is boolean,boolean,
     1285 *                      If response is string, string,
     1286 *                      otherwise, mixed.
    12801287 */
    12811288function rest_sanitize_value_from_schema( $value, $args ) {
    12821289        if ( 'array' === $args['type'] ) {