Fix notices. Props ocean90. fixes #17528
git-svn-id: http://svn.automattic.com/wordpress/trunk@18038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
405223f7cf
commit
e68292421d
|
@ -104,7 +104,7 @@ foreach ( $menu as $id => $data ) {
|
|||
|
||||
// If there is only one submenu and it is has same destination as the parent,
|
||||
// remove the submenu.
|
||||
if ( 1 == count ( $submenu[$data[2]] ) ) {
|
||||
if ( ! empty( $submenu[$data[2]] ) && 1 == count ( $submenu[$data[2]] ) ) {
|
||||
$subs = $submenu[$data[2]];
|
||||
$first_sub = array_shift($subs);
|
||||
if ( $data[2] == $first_sub[2] )
|
||||
|
|
Loading…
Reference in New Issue