Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23181 closed defect (bug) (fixed)

Clear Notice from reset_header_image() method in Custom_Image_Header class

Reported by: wpsmith's profile wpsmith Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch dev-feedback
Focuses: Cc:


If you take the following steps you will receive a notice for default_data.

  1. Custom header is enabled with a default header image (with no other header images uploaded).
  2. The user clicks Remove Header Image.
  3. The user clicks Restore Original Header Image.

Attachments (2)

23181.patch (449 bytes) - added by wpsmith 11 years ago.
23181.2.patch (487 bytes) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (8)

11 years ago

#1 @obenland
11 years ago

I could not recreate it in latest trunk with the steps outlined above.

#2 @wpsmith
11 years ago

If you add the following to TwentyTwelve, it produces the same error.

		'default-image'       => '', //Ensure image is there
		'header-text'         => '',
		'default-text-color'  => 'blank',
		'width'               => 350,
		'height'              => 100,
		'random-default'      => false,

Here's a screencast:

Please note while the video demonstrates it with a Genesis Child theme image, this was tested in both Genesis, TwentyEleven, and TwentyTwelve.

#3 @wpsmith
11 years ago

  • Component changed from General to Administration
  • Keywords has-patch dev-feedback needs-testing added

#4 @SergeyBiryukov
11 years ago

  • Component changed from Administration to Appearance
  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 3.6

Confirmed with the code from comment:2.

23181.2.patch is an alternative patch.

#5 @kovshenin
11 years ago

  • Cc kovshenin added

23181.patch can potentially leave old header image data in the header_image_data theme mod. If we're checking with !empty perhaps we should remove_theme_mod otherwise. 23181.2.patch looks reasonable, since it overwrites the previous value with an empty object.

#6 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 23337:

Define the variable before using it. fixes #23181.

Note: See TracTickets for help on using tickets.