Opened 13 years ago
Closed 13 years ago
#24014 closed defect (bug) (fixed)
Undefined variable: nav_menu_id in /wp-includes/nav-menu.php on line 195
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.6 | Priority: | normal |
| Severity: | minor | Version: | 3.6 |
| Component: | Menus | Keywords: | has-patch |
| Focuses: | Cc: |
Description
To reproduce:
- Delete an existing nav menu
Error (PHP notice):
Notice: Undefined variable: nav_menu_id in /xxxxxx/wp-includes/nav-menu.php on line 195
// Remove this menu from any locations.
193 $locations = get_theme_mod( 'nav_menu_locations' );
194 foreach ( (array) $locations as $location => $menu_id ) {
195 if ( $menu_id == $nav_menu_id )
196 $locations[ $location ] = 0;
197 }
198 set_theme_mod( 'nav_menu_locations', $locations );
Offending line:
if ( $menu_id == $nav_menu_id )
...but $nav_menu_id is not defined in the function.
Attachments (2)
Change History (6)
#3
in reply to:
↑ 2
@
13 years ago
Replying to SergeyBiryukov:
Should have refreshed the page. Didn't see your patch.
Note: See
TracTickets for help on using
tickets.
Introduced in [23897].