[wp-trac] [WordPress Trac] #21515: No custom header support in theme == Fatal error: Call to a member function process_default_headers() on a non-object
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 7 23:38:19 UTC 2012
#21515: No custom header support in theme == Fatal error: Call to a member function
process_default_headers() on a non-object
--------------------------+------------------------------------
Reporter: c3mdigital | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords: has-patch dev-feedback
--------------------------+------------------------------------
In 3.5 (21468).
Using the customizer on a theme without custom header support causes fatal
error.
{{{
Fatal error: Call to a member function process_default_headers() on a non-
object in /Users/chris/Sites/newpatch/wp-includes/class-wp-customize-
control.php on line 759
Call Stack
# Time Memory Function Location
1 0.0012 287640 {main}( ) ../customize.php:0
2 0.3554 19316040 do_action( ) ../customize.php:34
3 0.3554 19317640 call_user_func_array ( )
../plugin.php:406
4 0.3555 19317672
WP_Customize_Header_Image_Control->prepare_control( ) ../plugin.php:406
}}}
var_dump( $custom_image_header ) results in NULL when theme does not have
custom header support.
Simple solution that fixes fatal error is a check on the object variable
and return if empty.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21515>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list