Make WordPress Core


Ignore:
Timestamp:
07/06/2017 07:04:11 AM (8 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

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

    r40804 r41012  
    22642264
    22652265            $existing_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
     2266            if ( is_wp_error( $existing_changeset_data ) ) {
     2267                return $existing_changeset_data;
     2268            }
    22662269        }
    22672270
Note: See TracChangeset for help on using the changeset viewer.