#28055 closed defect (bug) (fixed)
Twenty Fourteen: undefined index PHP warning when activating the Ephemera widget for first time in the Customizer
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
To repeat:
- Enable latest version of Twenty Fourteen with latest WP trunk (with WP_DEBUG on of course).
- Enter Customizer and add the Twenty Fourteen Ephemera widget to the "Content Sidebar" (so you can easily see the error output).
Warning text:
Undefined index: format in /wp-content/themes/twentyfourteen/inc/widgets.php on line 50
Attachments (2)
Change History (9)
#3
@
11 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 4.0
We can use the check we already have in Twenty_Fourteen_Ephemera_Widget::form()
:
tags/3.9/src/wp-content/themes/twentyfourteen/inc/widgets.php#L253
#4
@
11 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 28248:
#5
@
11 years ago
Please note when we use "good first bug" keyword. This was intended to be used for WordCamp Zurich contributor day, for a new contributor to learn how to patch a Trac ticket.
Note: See
TracTickets for help on using
tickets.
Here is my proposal. Simply checks if the
'format'
key exists. If not, I set the value to'aside'
which is the default value in the widget configuration.