mirror of
git://develop.git.wordpress.org/
synced 2025-04-07 13:43:25 +02: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. git-svn-id: https://develop.svn.wordpress.org/trunk@58906 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4d8ac8b13c
commit
39ce3bcae0
@ -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/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user