Ticket #45361: 45361.6.diff
File 45361.6.diff, 1.2 KB (added by , 6 years ago) |
---|
-
src/wp-includes/nav-menu.php
92 92 93 93 add_theme_support( 'menus' ); 94 94 95 foreach ( $locations as $key => $value ) { 96 if ( is_int( $key ) ) { 97 _doing_it_wrong( __FUNCTION__, __( 'Nav menu locations must be strings.' ), '5.3' ); 98 break; 99 } 100 } 101 95 102 $_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations ); 96 103 } 97 104 -
tests/phpunit/tests/menu/nav-menu.php
182 182 /** 183 183 * Technically possible to register menu locations numerically. 184 184 * 185 * @expectedIncorrectUsage register_nav_menus 186 * 185 187 * @covers ::wp_map_nav_menu_locations() 186 188 */ 187 189 function test_numerical_locations() { … … 205 207 /** 206 208 * Technically possible old nav menu locations were registered numerically. 207 209 * 210 * @expectedIncorrectUsage register_nav_menus 211 * 208 212 * @covers wp_map_nav_menu_locations() 209 213 */ 210 214 public function test_numerical_old_locations() {