WordPress.org

Make WordPress Core

Ticket #17528: 17528.fix-notices.patch

File 17528.fix-notices.patch, 549 bytes (added by ocean90, 4 years ago)
  • wp-admin/includes/menu.php

     
    104104 
    105105        // If there is only one submenu and it is has same destination as the parent, 
    106106        // remove the submenu. 
    107         if ( 1 == count ( $submenu[$data[2]] ) ) { 
     107        if ( ! empty( $submenu[$data[2]] ) && 1 == count ( $submenu[$data[2]] ) ) { 
    108108                $subs = $submenu[$data[2]]; 
    109109                $first_sub = array_shift($subs); 
    110110                if ( $data[2] == $first_sub[2] )