[wp-trac] [WordPress Trac] #13773: Warning and wrong blog prefix in get_most_active_blogs() and get_blog_list()

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 7 19:05:17 UTC 2010


#13773: Warning and wrong blog prefix in get_most_active_blogs() and
get_blog_list()
--------------------------+-------------------------------------------------
 Reporter:  ocean90       |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  high          |   Milestone:  3.0      
Component:  Multisite     |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 1. In get_blog_list() and get_most_active_blogs() you get a warning:
 {{{
 Notice: Undefined index: time in \wp-includes\ms-blogs.php on line 548
 }}}
 The reason is, $blogs['time'] will be never set and/or saved. The best
 would be here to use the Transient API, see the patches.[[BR]]

 2. A regression: The main site doesn't have a wp_1_posts table anymore, it
 has wp_posts. Because of that get_blog_list() returns 0 posts for the main
 site. We should use $wpdb->get_blog_prefix($id) to avoid it.

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


More information about the wp-trac mailing list