Fix string offset PHP 5.4 error by normalizing $user_count to always be an integer. props ericmann. see #20966 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@21105 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-06-25 19:40:16 +00:00
parent a660b3818d
commit d6755ee068
1 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ function wp_version_check() {
$multisite_enabled = 1; $multisite_enabled = 1;
} else { } else {
$user_count = count_users( ); $user_count = count_users( );
$user_count = $user_count['total_users'];
$multisite_enabled = 0; $multisite_enabled = 0;
$num_blogs = 1; $num_blogs = 1;
$wp_install = home_url( '/' ); $wp_install = home_url( '/' );
@ -70,7 +71,7 @@ function wp_version_check() {
'mysql' => $mysql_version, 'mysql' => $mysql_version,
'local_package' => isset( $wp_local_package ) ? $wp_local_package : '', 'local_package' => isset( $wp_local_package ) ? $wp_local_package : '',
'blogs' => $num_blogs, 'blogs' => $num_blogs,
'users' => $user_count['total_users'], 'users' => $user_count,
'multisite_enabled' => $multisite_enabled 'multisite_enabled' => $multisite_enabled
); );