Check if update_core() exists before calling it in Core_Upgrader. If not, issue an error message that the copy failed likely due to disk space. fixes #19883.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-04-27 18:57:59 +00:00
parent 2f26bbdf8d
commit 0af650a02c
1 changed files with 4 additions and 0 deletions

View File

@ -1021,6 +1021,7 @@ class Core_Upgrader extends WP_Upgrader {
$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
$this->strings['unpack_package'] = __('Unpacking the update&#8230;');
$this->strings['copy_failed'] = __('Could not copy files.');
$this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' );
}
function upgrade($current) {
@ -1073,6 +1074,9 @@ class Core_Upgrader extends WP_Upgrader {
require(ABSPATH . 'wp-admin/includes/update-core.php');
if ( ! function_exists( 'update_core' ) )
return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] );
return update_core($working_dir, $wp_dir);
}