Fix notices. Props ocean90. fixes #17528
git-svn-id: https://develop.svn.wordpress.org/trunk@18038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c28266caae
commit
385262f36e
|
@ -104,7 +104,7 @@ foreach ( $menu as $id => $data ) {
|
||||||
|
|
||||||
// If there is only one submenu and it is has same destination as the parent,
|
// If there is only one submenu and it is has same destination as the parent,
|
||||||
// remove the submenu.
|
// remove the submenu.
|
||||||
if ( 1 == count ( $submenu[$data[2]] ) ) {
|
if ( ! empty( $submenu[$data[2]] ) && 1 == count ( $submenu[$data[2]] ) ) {
|
||||||
$subs = $submenu[$data[2]];
|
$subs = $submenu[$data[2]];
|
||||||
$first_sub = array_shift($subs);
|
$first_sub = array_shift($subs);
|
||||||
if ( $data[2] == $first_sub[2] )
|
if ( $data[2] == $first_sub[2] )
|
||||||
|
|
Loading…
Reference in New Issue