Make WordPress Core


Ignore:
Timestamp:
08/12/2017 09:20:23 PM (7 years ago)
Author:
westonruter
Message:

Customize: Fix PHP warning raised when deleting a setting from changeset via passing null as params in WP_Customize_Manager::save_changeset_post().

Props dlh.
Fixes #41621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r41205 r41243  
    22792279        // Amend post values with any supplied data.
    22802280        foreach ( $args['data'] as $setting_id => $setting_params ) {
    2281             if ( array_key_exists( 'value', $setting_params ) ) {
     2281            if ( is_array( $setting_params ) && array_key_exists( 'value', $setting_params ) ) {
    22822282                $this->set_post_value( $setting_id, $setting_params['value'] ); // Add to post values so that they can be validated and sanitized.
    22832283            }
Note: See TracChangeset for help on using the changeset viewer.