WordPress.org

Make WordPress Core

Changeset 18697


Ignore:
Timestamp:
09/17/2011 09:14:27 AM (10 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/update.php

    r18468 r18697  
    5858    }
    5959
    60     $local_package = isset( $wp_local_package )? $wp_local_package : '';
    61     $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";
     60    $query = array(
     61        'version'           => $wp_version,
     62        'php'               => $php_version,
     63        'locale'            => $locale,
     64        'mysql'             => $mysql_version,
     65        'local_package'     => isset( $wp_local_package ) ? $wp_local_package : '',
     66        'blogs'             => $num_blogs,
     67        'users'             => $user_count['total_users'],
     68        'multisite_enabled' => $multisite_enabled
     69    );
     70
     71    $url = 'http://api.wordpress.org/core/version-check/1.6/?' . http_build_query( $query, null, '&' );
    6272
    6373    $options = array(
Note: See TracChangeset for help on using the changeset viewer.