WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#15469 closed defect (bug) (fixed)

Undefined offset on pages without permission

Reported by: wpdavis Owned by:
Milestone: 3.1 Priority: normal
Severity: minor Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

On pages in wp-admin/network, I was getting this error if multisite was not enabled:

Notice: Undefined offset: 0 in wp-admin/includes/menu.php on line 152

Attached patch moves the call to add_menu_classes(); until after the check if the user can access the page.

Attachments (1)

menu_fix_undefined_offset.patch (535 bytes) - added by wpdavis 9 years ago.
Avoid undefined offset error by moving call to add_menu_classes() until after the permissions check

Download all attachments as: .zip

Change History (3)

@wpdavis
9 years ago

Avoid undefined offset error by moving call to add_menu_classes() until after the permissions check

#1 @nacin
9 years ago

  • Milestone changed from Awaiting Review to 3.1

Saw this too, but didn't care so much :)

#2 @ryan
9 years ago

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

(In [16471]) Fix undefined offset warnings on pages the current user does not have perms for. Props wpdavis. fixes #15469

Note: See TracTickets for help on using tickets.