diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-28 11:09:04 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-28 11:09:04 +0000 |
commit | 8793e6d3bd8918c91316f50fd52a1246e52df786 (patch) | |
tree | 3e063f9ceabc65284d435fb40b88cff5c7de1bb9 /wp-includes/wpmu-functions.php | |
parent | a70b0a2b6a90bd844351db9438002b7ea5a43476 (diff) | |
download | wordpress-mu-8793e6d3bd8918c91316f50fd52a1246e52df786.tar.gz wordpress-mu-8793e6d3bd8918c91316f50fd52a1246e52df786.tar.xz wordpress-mu-8793e6d3bd8918c91316f50fd52a1246e52df786.zip |
Check that $wp_roles exists (http://mu.wordpress.org/forums/topic.php?id=965&page=2&replies=32#post-7211)
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@607 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r-- | wp-includes/wpmu-functions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php index 376b9fc..71279fe 100644 --- a/wp-includes/wpmu-functions.php +++ b/wp-includes/wpmu-functions.php @@ -373,9 +373,11 @@ function switch_to_blog( $new_blog ) { //$wp_object_cache->cache_enabled = false; wp_cache_flush(); wp_cache_close(); - $wpdb->hide_errors(); - $wp_roles->_init(); - $wpdb->show_errors(); + if( is_object( $wp_roles ) ) { + $wpdb->hide_errors(); + $wp_roles->_init(); + $wpdb->show_errors(); + } wp_cache_init(); do_action('switch_blog', $blog_id, $tmpoldblogdetails[ 'blog_id' ]); |