diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 79f89d62d1..9b6eeba9b3 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -1186,7 +1186,9 @@ function wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locat foreach ( $registered_nav_menus as $new_location => $name ) { // ...actually match! - if ( false === stripos( $new_location, $slug ) && false === stripos( $slug, $new_location ) ) { + if ( is_string( $new_location ) && false === stripos( $new_location, $slug ) && false === stripos( $slug, $new_location ) ) { + continue; + } elseif ( is_numeric( $new_location ) && $new_location !== $slug ) { continue; } @@ -1197,7 +1199,9 @@ function wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locat foreach ( $slug_group as $slug ) { // ... have a match as well. - if ( false === stripos( $location, $slug ) && false === stripos( $slug, $location ) ) { + if ( is_string( $location ) && false === stripos( $location, $slug ) && false === stripos( $slug, $location ) ) { + continue; + } elseif ( is_numeric( $location ) && $location !== $slug ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index c9eb662959..b83fccd353 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44166'; +$wp_version = '5.1-alpha-44167'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.