From 69e9cf288842ae0cb49af0ec688bb676aca5c8e3 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 25 Jun 2012 19:40:16 +0000 Subject: [PATCH] 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: http://core.svn.wordpress.org/trunk@21105 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index f441135459..ddd6cad659 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -58,6 +58,7 @@ function wp_version_check() { $multisite_enabled = 1; } else { $user_count = count_users( ); + $user_count = $user_count['total_users']; $multisite_enabled = 0; $num_blogs = 1; $wp_install = home_url( '/' ); @@ -70,7 +71,7 @@ function wp_version_check() { 'mysql' => $mysql_version, 'local_package' => isset( $wp_local_package ) ? $wp_local_package : '', 'blogs' => $num_blogs, - 'users' => $user_count['total_users'], + 'users' => $user_count, 'multisite_enabled' => $multisite_enabled );