Opened 3 years ago

Closed 3 years ago

#15469 closed defect (bug) (fixed)

Undefined offset on pages without permission

Reported by: wpdavis Owned by:
Priority: normal Milestone: 3.1
Component: General Version: 3.1
Severity: minor Keywords: has-patch
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 3 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)

wpdavis3 years ago

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

  • Milestone changed from Awaiting Review to 3.1

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

comment:2   ryan3 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.