[wp-trac] [WordPress Trac] #21459: Cleanup switch_to_blog() and restore_current_blog()

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 21 18:38:15 UTC 2012


#21459: Cleanup switch_to_blog() and restore_current_blog()
-------------------------+-----------------------
 Reporter:  ryan         |       Owner:  ryan
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  3.5
Component:  Multisite    |     Version:  3.4.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------

Comment (by ryan):

 With 21459-no-switched.2.diff, the multisite unit tests exhibit some odd
 behavior. Tests_Post_Objects::test_get_post_array() fatal errors inside
 get_post() because WP_Post::filter() is returning false. The subsequent
 to_array() call is thus done on a non-object. Looking at $this in
 ::filter(), the post is js filtered. This is not expected. I suspect a
 cache problem.

 {{{
 Fatal error: Call to a member function to_array() on a non-object in
 /.../unit-tests/trunk/wordpress/wp-includes/post.php on line 406
 }}}

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


More information about the wp-trac mailing list