Index: src/wp-includes/nav-menu.php
===================================================================
--- src/wp-includes/nav-menu.php	(revision 46097)
+++ src/wp-includes/nav-menu.php	(working copy)
@@ -92,6 +92,13 @@
 
 	add_theme_support( 'menus' );
 
+	foreach ( $locations as $key => $value ) {
+		if ( is_int( $key ) ) {
+			_doing_it_wrong( __FUNCTION__, __( 'Nav menu locations must be strings.' ), '5.3' );
+			break;
+		}
+	}
+
 	$_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations );
 }
 
Index: tests/phpunit/tests/menu/nav-menu.php
===================================================================
--- tests/phpunit/tests/menu/nav-menu.php	(revision 46097)
+++ tests/phpunit/tests/menu/nav-menu.php	(working copy)
@@ -182,6 +182,8 @@
 	/**
 	 * Technically possible to register menu locations numerically.
 	 *
+	 * @expectedIncorrectUsage register_nav_menus
+	 *
 	 * @covers ::wp_map_nav_menu_locations()
 	 */
 	function test_numerical_locations() {
@@ -205,6 +207,8 @@
 	/**
 	 * Technically possible old nav menu locations were registered numerically.
 	 *
+	 * @expectedIncorrectUsage register_nav_menus
+	 *
 	 * @covers wp_map_nav_menu_locations()
 	 */
 	public function test_numerical_old_locations() {
