WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#18327 closed defect (bug) (duplicate)

remove_menu_page('index.php'); causes Notices - risk of unexpected results?

Reported by: anmari Owned by:
Milestone: Priority: normal
Severity: trivial Version: 3.2.1
Component: Menus Keywords:
Focuses: Cc:

Description

Thanks for the new remove_menu functions!

However if one adds action on admin menu and does

remove_menu_page('index.php');

This causes a lot of notices

Notice: Undefined offset: 0 in C:\web\wpbeta\wp\wp-admin\includes\menu.php on line 161

Notice: Undefined offset: 2 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 51

Notice: Undefined offset: 2 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 56

Notice: Undefined offset: 2 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 61

Notice: Undefined offset: 0 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 81

Notice: Undefined offset: 2 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 87

Notice: Undefined offset: 2 in C:\web\wpbeta\wp\wp-admin\menu-header.php on line 112

Attachments (1)

menu.jpg (64.0 KB) - added by anmari 9 years ago.
screenshot

Download all attachments as: .zip

Change History (4)

@anmari
9 years ago

screenshot

#1 @ocean90
9 years ago

Related: #18085

#2 @c3mdigital
7 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Resolving as duplicate of #18085. Fixed in r18740

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted

Actually, fixed in [24455]. #18085 was another issue.

Marking as a duplicate of #23182.

Note: See TracTickets for help on using tickets.