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:
parent
2f26bbdf8d
commit
0af650a02c
|
@ -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