WordPress.org

Make WordPress Core

Ticket #18975: 18975.2.patch

File 18975.2.patch, 1.1 KB (added by SergeyBiryukov, 4 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( $last_menu_key = array_keys( $menu ) ); 
     218$last_menu_key = array_keys( $menu ); 
     219$last_menu_key = array_pop( $last_menu_key ); 
    219220if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] ) 
    220221        unset( $menu[ $last_menu_key ] ); 
    221222unset( $last_menu_key ); 
  • wp-includes/pomo/mo.php

     
    195195                        $translation = $reader->substr( $strings, $t['pos'], $t['length'] ); 
    196196 
    197197                        if ('' === $original) { 
    198                                 $this->set_headers($this->make_headers($translation)); 
     198                                $headers = $this->make_headers($translation); 
     199                                $this->set_headers($headers); 
    199200                        } else { 
    200201                                $entry = &$this->make_entry($original, $translation); 
    201202                                $this->entries[$entry->key()] = &$entry;