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:
parent
5b0664dde5
commit
27f74ce583
@ -1021,6 +1021,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
|
||||
$this->strings['unpack_package'] = __('Unpacking the update…');
|
||||
$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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user