[wp-trac] Re: [WordPress Trac] #2531: Functions for registering additional capabilities and getting a list of all capabilities

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 28 22:40:03 GMT 2007


#2531: Functions for registering additional capabilities and getting a list of all
capabilities
-----------------------------------+----------------------------------------
 Reporter:  markjaquith            |        Owner:  anonymous
     Type:  defect                 |       Status:  new      
 Priority:  normal                 |    Milestone:  2.4      
Component:  Administration         |      Version:  2.0.1    
 Severity:  normal                 |   Resolution:           
 Keywords:  has-patch 2nd-opinion  |  
-----------------------------------+----------------------------------------
Comment (by josepo):

 I found I needed to add the following after line 422 of the diff file that
 was posted by markjaquith on 03/06/06  to get the get_all_caps() function
 to work properly:

 if (!isset($wp_roles)) $wp_roles = new WP_Roles();

 Otherwise, I would get an error in line 425 where the foreach - loop
 accesses the global $wp_roles variable, simply because the variable had
 not been set yet...

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2531#comment:15>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list