﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
20966	Inconsistent Variable Usage	ericmann	ericmann	"Someone in the forums alerted me to a potential issue with the code in `wp_version_check()`.  It seems we're using two different functions to get a user count depending on whether we're in Multisite or a standalone installation.

The Multisite function (`get_user_count()`) returns a number.  The standalone function (`count_users()`) returns an array.  We then assume the array when we use the variable later to build the version check query.

In some situations, this can result in an ""illegal string offset"" error.

In other situations, it will generate inaccurate data.  Assume the following situation:

- `get_user_count()` returns ""100"" because there are 100 users.
- `$user_count['total_users']` will return ""1""

When you reference a string as an array with an offset that doesn't exist, it only returns the first digit.  So our count, in this case, is only accurate for Multisite installations with 1-9 users.

Not a huge end-user issue ... but confusing for WP.org stats in the long run if it remains unpatched.

I have worked out a patch that will fix the stat reporting issue for us and silence any ""illegal string offset"" issues other developers might be experiencing."	defect (bug)	closed	normal	3.4.1	Upgrade/Install	3.1	minor	fixed	has-patch commit	
