Make sure is instantiated. see #12997

git-svn-id: http://svn.automattic.com/wordpress/trunk@14094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-04-15 21:24:52 +00:00
parent c229cdcba7
commit fcd9d28f10
1 changed files with 6 additions and 1 deletions

View File

@ -418,7 +418,12 @@ function count_users($strategy = 'time') {
$blog_prefix = $wpdb->get_blog_prefix($id);
$result = array();
if ('time' == $strategy) {
if ( 'time' == $strategy ) {
global $wp_roles;
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
$avail_roles = $wp_roles->get_names();
// Build a CPU-intensive query that will return concise information.