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:
Sergey Biryukov 2024-08-17 19:54:13 +00:00
parent 8efc6e1807
commit e7e1e6549f
2 changed files with 6 additions and 6 deletions

View File

@ -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/';

View File

@ -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.