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: https://develop.svn.wordpress.org/trunk@20619 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-04-27 18:57:59 +00:00
parent 5b0664dde5
commit 27f74ce583

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);
}