#23508 closed defect (bug) (fixed)
Nav Menu Saving: get_nav_menu_locations() can return false, code expects array
| Reported by: | Viper007Bond | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Menus | Version: | 3.6 |
| Severity: | normal | Keywords: | has-patch 3.6-menus needs-codex |
| Cc: | Focuses: |
Description
get_nav_menu_locations() can return false (it is right now with Twenty Thirteen) but /wp-admin/nav-menu.php tries to always treat it as an array:
https://core.trac.wordpress.org/browser/trunk/wp-admin/nav-menus.php?rev=23441#L277
This throws a warning and breaks stuff.
Attachments (3)
Change History (14)
#3
@
13 years ago
- Resolution fixed
- Status closed → reopened
I think get_nav_menu_locations() should always return an array, as the docs say. Let's try to also fix that?
#8
@
13 years ago
23508.3.diff works for me.
#9
@
13 years ago
Not sure if we need the ! empty() check, is_array() seems enough (23508.2.diff).
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
ticket:23119:23119.4.diff would fix it, see ticket:23119:224.