#27841 closed defect (bug) (invalid)
Fix Custom Menu save notices when there are no menus created
| Reported by: | nofearinc | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | 3.9 |
| Severity: | minor | Keywords: | has-patch close |
| Cc: | Focuses: |
Description
When adding the Custom Menu widget on a clean 3.9 install without custom menus created upfront, two PHP notices are triggered:
PHP Notice: Undefined index: title in /opt/lampp/htdocs/wp39/wp-includes/default-widgets.php on line 1326, referer: http://localhost/wp39/wp-admin/widgets.php
PHP Notice: Undefined index: nav_menu in /opt/lampp/htdocs/wp39/wp-includes/default-widgets.php on line 1327, referer: http://localhost/wp39/wp-admin/widgets.php
Adding an isset() check with default values before populating.
Attachments (1)
Change History (6)
#3
@
12 years ago
- Keywords reporter-feedback added
Is this still an issue? Can't reproduce this in current trunk.
The other update() methods don't do an isset() check too.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This doesn't seem to be a regression. Otherwise... related/duplicate of #27878? (At least the solution there.)