WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#25000 closed defect (bug) (invalid)

Missing globals in update_core() ?

Reported by: tivnet Owned by:
Milestone: Priority: normal
Severity: trivial Version: 3.5
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

$required_php_version, $wp_version, and $required_mysql_version appear undefined.

Attachments (1)

update-core.php.patch (516 bytes) - added by tivnet 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @jeremyfelt
8 years ago

  • Milestone changed from Awaiting Review to 3.7

#2 follow-up: @dd32
8 years ago

  • Milestone 3.7 deleted
  • Resolution set to invalid
  • Status changed from new to closed

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.

#3 in reply to: ↑ 2 @tivnet
8 years ago

Replying to dd32:

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.

Thank you for the clarification.

#4 @SergeyBiryukov
8 years ago

  • Version changed from trunk to 3.5

Related: [22227]

Note: See TracTickets for help on using tickets.