[wp-trac] [WordPress Trac] #25000: Missing globals in update_core() ?

WordPress Trac noreply at wordpress.org
Fri Aug 9 03:06:24 UTC 2013


#25000: Missing globals in update_core() ?
-----------------------------+----------------------
 Reporter:  tivnet           |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  trivial          |  Resolution:  invalid
 Keywords:  has-patch        |
-----------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  3.7 =>


Comment:

 See this part further down the function:
 {{{
 652             // Import $wp_version, $required_php_version, and
 $required_mysql_version from the new version
 653             // $wp_filesystem->wp_content_dir() returned unslashed
 pre-2.8
 654             $versions_file = trailingslashit(
 $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php';
 655             if ( ! $wp_filesystem->copy( $from . $distro . 'wp-
 includes/version.php', $versions_file ) ) {
 656                      $wp_filesystem->delete( $from, true );
 657                      return new WP_Error( 'copy_failed', __('Could not
 copy file.') );
 658             }
 659
 660             $wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE );
 661             require_once( WP_CONTENT_DIR . '/upgrade/version-
 current.php' );
 662             $wp_filesystem->delete( $versions_file );
 }}}

 The aim is that the global vars at time of update are still the old
 version versions, whereas the function needs to import the versions from
 the newer version.php file.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25000#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list