[wpmu-trac] [WordPress MU Trac] #890: Wrong call to upgrade.php

WordPress MU Trac wpmu-trac at lists.automattic.com
Thu Feb 5 18:44:41 GMT 2009


#890: Wrong call to upgrade.php
------------------------+---------------------------------------------------
 Reporter:  tomgf       |       Owner:  somebody              
     Type:  defect      |      Status:  new                   
 Priority:  normal      |   Milestone:  2.7                   
Component:  component1  |     Version:  2.7                   
 Severity:  normal      |    Keywords:  error 404, upgrade.php
------------------------+---------------------------------------------------
 Under a directory installation WP MU is calling upgrade.php from wp-
 admin/admin.php (line 23) using this code:

 {{{
 $response = wp_remote_get( get_option( "siteurl" ) . "wp-
 admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1'
 ) );

 }}}

 get_option( "siteurl" ) gives this output: http://www.mydomain.com/myblog
 (without a trailing slash). Therefore, the call is http://www.mydomain.com
 /myblogwp-admin/upgrade.php?step=1 (which of course gave a 404 error).

 get_option() function (in wp-includes/functions.php) has this:

 {{{
 if ( in_array( $setting, array('siteurl', 'home', 'category_base',
 'tag_base') ) )
   $value = untrailingslashit( $value );

 }}}

 '''A possible solution'''

 Change in wp-admin/admin.php:

 {{{
 - $response = wp_remote_get( get_option( "siteurl" ) . "wp-
 admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1'
 ) );
 + $response = wp_remote_get( get_option( "siteurl" ) . "/wp-
 admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1'
 ) );
 }}}

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/890>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list