From 1b84d2140a3c078792fb76e37459747f377310a5 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 20 Jun 2013 16:45:45 +0000 Subject: [PATCH] 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 --- wp-admin/includes/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php index 14cadfa6f7..e315c7666b 100644 --- a/wp-admin/includes/menu.php +++ b/wp-admin/includes/menu.php @@ -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);