Use http_build_query in the Core Update check to encode version numbers. Props kurtpayne. Fixes #18051

git-svn-id: https://develop.svn.wordpress.org/trunk@18697 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-09-17 09:14:27 +00:00
parent 6244ba8f6e
commit 1bc9770151
1 changed files with 12 additions and 2 deletions

View File

@ -57,8 +57,18 @@ function wp_version_check() {
$wp_install = home_url( '/' );
}
$local_package = isset( $wp_local_package )? $wp_local_package : '';
$url = "http://api.wordpress.org/core/version-check/1.6/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package&blogs=$num_blogs&users={$user_count['total_users']}&multisite_enabled=$multisite_enabled";
$query = array(
'version' => $wp_version,
'php' => $php_version,
'locale' => $locale,
'mysql' => $mysql_version,
'local_package' => isset( $wp_local_package ) ? $wp_local_package : '',
'blogs' => $num_blogs,
'users' => $user_count['total_users'],
'multisite_enabled' => $multisite_enabled
);
$url = 'http://api.wordpress.org/core/version-check/1.6/?' . http_build_query( $query, null, '&' );
$options = array(
'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),