Opened 12 years ago
Closed 11 years ago
#23051 closed defect (bug) (fixed)
Menu with navigation label '0' gets removed
Reported by: | zsero | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
There is no way to save a menu item with Navigation Label = 0 (zero). It gets removed. I think it's a bug in an if statement where 0 happens to be False or something similar.
Attachments (3)
Change History (12)
#5
@
12 years ago
In 23051.2.diff do a string length comparison, rather than empty
or isset
. Also refreshed for current trunk since things have moved around in menus. Or maybe it's just easier to compare to an empty string?
#7
@
11 years ago
I think we should have isset()
in some of those checks.
23051.3.diff also simplifies the logic in wp_update_nav_menu_item()
.
Note: See
TracTickets for help on using
tickets.
change empty to ! isset