[wp-trac] [WordPress Trac] #18085: Notice: Undefined index: in /var/www/wp-admin/includes/menu.php on line 219

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 12 18:33:12 UTC 2011


#18085: Notice: Undefined index: in /var/www/wp-admin/includes/menu.php on line 219
-----------------------------+-----------------------------
 Reporter:  ansimation       |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Role/Capability  |    Version:
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 When a new role is created with no capabilities that allow the user to
 view the back end like so ( added to end of functions.php for twentyeleven
 theme. ):

 {{{
 add_action( 'init', 'add_new_roles' );
 function add_new_roles(){
     add_role( 'new_role', 'New Role', array( 'read', 'foo' ) );
 }
 }}}

 create a new user with the 'new role' and then log out and log back in as
 this user. with WP_DEBUG set to true it shows the message saying you do
 not have permissions to view the page but then there's a notice above it
 saying Notice: Undefined index: in /var/www/wp-admin/includes/menu.php on
 line 219.

 I just did a new svn checkout and tried it with the twentyeleven theme to
 be sure it wasn't something that I did and it still did it.

 patch attached

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18085>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list