[wp-trac] [WordPress Trac] #2976: get_author_link() can fail if
 nicename not provided
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Wed Jul 26 06:03:52 GMT 2006
    
    
  
#2976: get_author_link() can fail if nicename not provided
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:  anonymous
     Type:  defect       |      Status:  new      
 Priority:  normal       |   Milestone:           
Component:  General      |     Version:  2.0.3    
 Severity:  normal       |    Keywords:           
-------------------------+--------------------------------------------------
 get_author_link() takes an echo true/false, an author ID, and a third
 (optional) param: the author's nicename.
 If the nicename isn't provided and the author's data isn't cached in the
 global $cache_userdata, the link will be incorrect.
 Here is the offending code:
 {{{
                 if ( '' == $author_nicename )
                         $author_nicename =
 $cache_userdata[$author_id]->user_nicename;
 }}}
 shouldn't we be using the object cache here?
-- 
Ticket URL: <http://trac.wordpress.org/ticket/2976>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list