Opened 8 years ago
Closed 8 years ago
#41007 closed defect (bug) (fixed)
Custom_Image_Header::customize_set_last_used() blocking customizer save response from coming through
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9 | Priority: | normal |
| Severity: | normal | Version: | 3.9 |
| Component: | Customize | Keywords: | has-patch |
| Focuses: | administration | Cc: |
Description
At my company, we are building a plugin that requires resetting the customizer to a blank slate. using the code in this tutorial by @westonruter
When we try to save changes in customizer, we got the error below
[12-Jun-2017 11:06:39 UTC] PHP Fatal error: Uncaught Error: Call to a member function post_value() on null in /home/vagrant/Code/WordPress/public/wp-admin/custom-header.php:1324
Stack trace:
#0 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(298): Custom_Image_Header->customize_set_last_used(Object(WP_Customize_Manager))
#1 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#2 /home/vagrant/Code/WordPress/public/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-customize-manager.php(2739): do_action('customize_save_...', Object(WP_Customize_Manager))
#4 /home/vagrant/Code/WordPress/public/wp-includes/theme.php(2870): WP_Customize_Manager->_publish_changeset_values(4106)
#5 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(298): _wp_customize_publish_changeset('publish', 'new', Object(WP_Post))
#6 /home/vagrant/Code/WordPress/public/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Arr in /home/vagrant/Code/WordPress/public/wp-admin/custom-header.php on line 1324
The submitted patch fixes this issue by making sure $wp_customize->get_setting( 'header_image_data' ) return an instance of WP_Customize_Setting
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Good catch.