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.

Built from https://develop.svn.wordpress.org/trunk@41243


git-svn-id: http://core.svn.wordpress.org/trunk@41083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-08-12 21:21:48 +00:00
parent 473e1ba73b
commit 6428de97a7
2 changed files with 2 additions and 2 deletions

View File

@ -2278,7 +2278,7 @@ final class WP_Customize_Manager {
// Amend post values with any supplied data. // Amend post values with any supplied data.
foreach ( $args['data'] as $setting_id => $setting_params ) { foreach ( $args['data'] as $setting_id => $setting_params ) {
if ( array_key_exists( 'value', $setting_params ) ) { if ( is_array( $setting_params ) && array_key_exists( 'value', $setting_params ) ) {
$this->set_post_value( $setting_id, $setting_params['value'] ); // Add to post values so that they can be validated and sanitized. $this->set_post_value( $setting_id, $setting_params['value'] ); // Add to post values so that they can be validated and sanitized.
} }
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-41242'; $wp_version = '4.9-alpha-41243';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.