[wp-trac] [WordPress Trac] #12023: switch_to_blog does not check if the blog really exists

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 10 17:52:44 UTC 2010


#12023: switch_to_blog does not check if the blog really exists
--------------------------+-------------------------------------------------
 Reporter:  wpmuguru      |        Owner:            
     Type:  defect (bug)  |       Status:  closed    
 Priority:  normal        |    Milestone:  Unassigned
Component:  Multisite     |      Version:            
 Severity:  normal        |   Resolution:  fixed     
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by wpmuguru):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 To check if the blog really exists when using switch_to_blog in a plugin,
 add a second parameter true

 {{{
 $exists = switch_to_blog($blog_id, true);
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12023#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list