mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Upgrade/Install: Remove the return value of _wp_delete_all_temp_backups()
.
This function is only utilized as a `shutdown` action callback, so the return value is not used anywhere. `wp_trigger_error()` is now used instead under the same conditions. Follow-up to [55720], [56342]. Props johnbillion, amitraj2203, narenin. Fixes #61116. Built from https://develop.svn.wordpress.org/trunk@58906 git-svn-id: http://core.svn.wordpress.org/trunk@58302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8efc6e1807
commit
e7e1e6549f
@ -1099,8 +1099,6 @@ function wp_delete_all_temp_backups() {
|
||||
* @access private
|
||||
*
|
||||
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
|
||||
*
|
||||
* @return void|WP_Error Void on success, or a WP_Error object on failure.
|
||||
*/
|
||||
function _wp_delete_all_temp_backups() {
|
||||
global $wp_filesystem;
|
||||
@ -1114,15 +1112,17 @@ function _wp_delete_all_temp_backups() {
|
||||
ob_end_clean();
|
||||
|
||||
if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
|
||||
return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
|
||||
wp_trigger_error( __FUNCTION__, __( 'Could not access filesystem.' ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $wp_filesystem->wp_content_dir() ) {
|
||||
return new WP_Error(
|
||||
'fs_no_content_dir',
|
||||
wp_trigger_error(
|
||||
__FUNCTION__,
|
||||
/* translators: %s: Directory name. */
|
||||
sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' )
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
$temp_backup_dir = $wp_filesystem->wp_content_dir() . 'upgrade-temp-backup/';
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58905';
|
||||
$wp_version = '6.7-alpha-58906';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user