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:
ryan 2011-05-25 16:46:40 +00:00
parent 405223f7cf
commit e68292421d
1 changed files with 1 additions and 1 deletions

View File

@ -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] )