[wp-trac] [WordPress Trac] #18051: Automatic updates fail if PHP/Mysql versions contain spaces

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 9 13:44:09 UTC 2011


#18051: Automatic updates fail if PHP/Mysql versions contain spaces
-----------------------------+-----------------------------
 Reporter:  vtd              |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  3.2
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 If the URL for checking for updates includes spaces (it does if PHP
 version is "5.2.5 (x64)", for example), then the check for updates fails (
 {{{
 wp_remote_get($url, $options)
 }}}
  in update.php returns  HTTP 400 Bad Request error, making automatic
 updates impossible (Wordpreess always says it's up to date). This can be
 fixed by processing PHP  and MySQL versions with urlencode(), so the url-
 formation line in updater.php should look like his


 {{{
 $url = "http://api.wordpress.org/core/version-check/1.6/?version=".
 urlencode($wp_version).
 "&php=".urlencode($php_version).
 "&locale=$locale&mysql=".urlencode($mysql_version).
 "&local_package=$local_package&blogs=$num_blogs&users={$user_count['total_users']}&multisite_enabled=$multisite_enabled";
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18051>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list