diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 38ef5c89bc..aff8a54373 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -1084,7 +1084,8 @@ function _wp_menus_changed() { * @return array Nav menus mapped to new nav menu locations. */ function wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locations ) { - $registered_nav_menus = get_registered_nav_menus(); + $registered_nav_menus = get_registered_nav_menus(); + $new_nav_menu_locations = array_intersect_key( $new_nav_menu_locations, $registered_nav_menus ); // Short-circuit if there are no old nav menu location assignments to map. if ( empty( $old_nav_menu_locations ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 8fd15a1129..18fecc2f20 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta1-41810'; +$wp_version = '4.9-beta1-41811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.