Opened 9 years ago
Closed 9 years ago
#41252 closed defect (bug) (fixed)
Customize: WP_Customize_Manager::save_changeset_post() can fail if get_changeset_post_data method returns WP_Error
| Reported by: | westonruter | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Customize | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: |
Description
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
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
https://github.com/xwp/wordpress-develop/pull/238