#23508 closed defect (bug) (fixed)
Nav Menu Saving: get_nav_menu_locations() can return false, code expects array
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Menus | Keywords: | has-patch 3.6-menus needs-codex |
Focuses: | Cc: |
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)
#2
@
12 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 23453:
#3
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I think get_nav_menu_locations() should always return an array, as the docs say. Let's try to also fix that?
#8
@
12 years ago
23508.3.diff works for me.
#9
@
12 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.
ticket:23119:23119.4.diff would fix it, see ticket:23119:224.