Make WordPress Core

Ticket #48296: 48296.diff

File 48296.diff, 872 bytes (added by itowhid06, 5 years ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php

    diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php
    index 5de792c041..69df721635 100644
    a b class WP_REST_Settings_Controller extends WP_REST_Controller { 
    124124         */
    125125        protected function prepare_value( $value, $schema ) {
    126126                // If the value is not valid by the schema, set the value to null. Null
    127                 // values are specifcally non-destructive so this will not cause overwriting
     127                // values are specifically non-destructive so this will not cause overwriting
    128128                // the current invalid value to null.
    129129                if ( is_wp_error( rest_validate_value_from_schema( $value, $schema ) ) ) {
    130130                        return null;