[wp-trac] [WordPress Trac] #25328: switch_to_blog() doesn't fail on validation

WordPress Trac noreply at wordpress.org
Sun Sep 15 18:50:04 UTC 2013


#25328: switch_to_blog() doesn't fail on validation
--------------------------+-----------------------------
 Reporter:  markoheijnen  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Multisite     |    Version:  3.0
 Severity:  normal        |   Keywords:  dev-feedback
--------------------------+-----------------------------
 Currently you can pass in a non existing blog id. It will always return
 true since there is no validation in switch_to_blog(). Even if the PHPDocs
 says it does do that.

 The best place to add a check is wpdb::set_blog_id() but I'm not sure if
 we want to add an extra database on the init of a site.

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


More information about the wp-trac mailing list