[wp-trac] [WordPress Trac] #41252: Customize: WP_Customize_Manager::save_changeset_post() can fail if get_changeset_post_data method returns WP_Error
WordPress Trac
noreply at wordpress.org
Thu Jul 6 02:01:02 UTC 2017
#41252: Customize: WP_Customize_Manager::save_changeset_post() can fail if
get_changeset_post_data method returns WP_Error
--------------------------+-------------------
Reporter: westonruter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.8.1
Component: Customize | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-------------------
If a changeset post is corrupted, then
`\WP_Customize_Manager::get_changeset_post_data()` will return a
`WP_Error`. This method is used by
`\WP_Customize_Manager::save_changeset_post()` to obtain an existing
changeset's post data to merge on top of. However, it is not doing the
necessary check to see if it is returning a `WP_Error`, and thus results
in a fatal error:
> PHP Fatal error: Cannot use object of type WP_Error as array in wp-
includes/class-wp-customize-manager.php on line 2334
Will amend [38810] for #30937.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41252>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list