Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#14010 closed defect (bug) (fixed)

PHP Notice: Undefined index in /wp-admin/plugins.php on line 16

Reported by: jorbin Owned by: nacin
Priority: normal Milestone: 3.1
Component: Administration Version: 3.0
Severity: trivial Keywords: has-patch commit
Cc: Focuses:

Description

the $menu_permsplugins could be empty causing a php notice. attached patch checks for an empty field in addition to not having ing the correct value to display the notice about the plugin page not being available for all users

Attachments (2)

plugins.php.15292.patch​ (550 bytes ) - added by jorbin 16 years ago.
14010.diff​ (853 bytes ) - added by nacin 16 years ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
16 years ago

  • Milestone Unassigned → 3.0.1
  • Owner set to nacin
  • Status new → accepted

Closed #14012 as a duplicate.

The empty() check is all we need. Also, it looks like the branching here can be approved, by wrapping both the wp_die and add_action in a single empty() check, inside which we check for is_super_admin().

Trivial, but marking for 3.0.1, this came out of the last commit of 3.0 if I remember correctly.

#2 @nacin
16 years ago

  • Keywords commit added

#3 @westi
16 years ago

  • Milestone 3.0.1 → 3.1

I'd leave this out of 3.0.1

We don't usually backport notices fixes to maintenance releases unless they unearth a true bug.

#4 @westi
16 years ago

  • Resolution → fixed
  • Status accepted → closed

(In [15323]) Fix notice when visiting the plugins page as a site admin with multisite enabled. Fixes #14010.

#5 @nacin
16 years ago

  • Milestone Awaiting Triage → 3.1
Note: See TracTickets for help on using tickets.