Prevent an offset error if the first menu item is a separator.

props phill_brown. fixes #23182

git-svn-id: http://core.svn.wordpress.org/trunk@24455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-06-20 16:45:45 +00:00
parent 06933ac440
commit 1b84d2140a
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ function add_menu_classes($menu) {
continue;
}
if ( 0 === strpos($top[2], 'separator') ) { // if separator
if ( 0 === strpos($top[2], 'separator') && false !== $lastorder ) { // if separator
$first = true;
$c = $menu[$lastorder][4];
$menu[$lastorder][4] = add_cssclass('menu-top-last', $c);