WordPress.org

Make WordPress Core

Ticket #18975: #18975.patch

File #18975.patch, 551 bytes (added by arena, 3 years ago)
  • wp-admin/includes/menu.php

     
    215215} 
    216216 
    217217// Remove the last menu item if it is a separator. 
    218 $last_menu_key = array_pop( array_keys( $menu ) ); 
     218$array_keys = array_keys( $menu ); 
     219$last_menu_key = array_pop( $array_keys ); 
    219220if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] ) 
    220221        unset( $menu[ $last_menu_key ] ); 
    221222unset( $last_menu_key );