Customize: Prevent edge case fatal error when attempting to save changes to a changeset that had previously been corrupted.
Check return value of `WP_Customize_Manager::get_changeset_post_data()` and return if error instead of assuming it is an array. Amends [38810]. See #30937. Fixes #41252. Built from https://develop.svn.wordpress.org/trunk@41012 git-svn-id: http://core.svn.wordpress.org/trunk@40862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
51ba397e29
commit
6b907d8437
|
@ -2263,6 +2263,9 @@ final class WP_Customize_Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
|
$existing_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
|
||||||
|
if ( is_wp_error( $existing_changeset_data ) ) {
|
||||||
|
return $existing_changeset_data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fail if attempting to publish but publish hook is missing.
|
// Fail if attempting to publish but publish hook is missing.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-41011';
|
$wp_version = '4.9-alpha-41012';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
|
Loading…
Reference in New Issue