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:
parent
6244ba8f6e
commit
1bc9770151
|
@ -57,8 +57,18 @@ function wp_version_check() {
|
||||||
$wp_install = home_url( '/' );
|
$wp_install = home_url( '/' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$local_package = isset( $wp_local_package )? $wp_local_package : '';
|
$query = array(
|
||||||
$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";
|
'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(
|
$options = array(
|
||||||
'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),
|
'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),
|
||||||
|
|
Loading…
Reference in New Issue