diff --git src/wp-includes/rest-api/class-wp-rest-request.php src/wp-includes/rest-api/class-wp-rest-request.php
index 3c465ba..dff6e0d 100644
|
|
class WP_REST_Request implements ArrayAccess { |
821 | 821 | // if no sanitize_callback was specified, default to rest_parse_request_arg |
822 | 822 | // if a type was specified in the args. |
823 | 823 | if ( ! isset( $attributes['args'][ $key ]['sanitize_callback'] ) && ! empty( $attributes['args'][ $key ]['type'] ) ) { |
824 | | $attributes['args'][ $key ]['sanitize_callback'] = 'rest_parse_request_arg'; |
| 824 | if( ! array_key_exists('sanitize_callback', $attributes['args'][ $key ] ) ) { |
| 825 | $attributes['args'][ $key ]['sanitize_callback'] = 'rest_parse_request_arg'; |
| 826 | } |
825 | 827 | } |
826 | 828 | // Check if this param has a sanitize_callback added. |
827 | 829 | if ( ! isset( $attributes['args'][ $key ] ) || empty( $attributes['args'][ $key ]['sanitize_callback'] ) ) { |