Make WordPress Core


Ignore:
Timestamp:
08/17/2024 07:52:46 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r58813 r58906  
    11001100 *
    11011101 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
    1102  *
    1103  * @return void|WP_Error Void on success, or a WP_Error object on failure.
    11041102 */
    11051103function _wp_delete_all_temp_backups() {
     
    11151113
    11161114    if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
    1117         return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
     1115        wp_trigger_error( __FUNCTION__, __( 'Could not access filesystem.' ) );
     1116        return;
    11181117    }
    11191118
    11201119    if ( ! $wp_filesystem->wp_content_dir() ) {
    1121         return new WP_Error(
    1122             'fs_no_content_dir',
     1120        wp_trigger_error(
     1121            __FUNCTION__,
    11231122            /* translators: %s: Directory name. */
    11241123            sprintf( __( 'Unable to locate WordPress content directory (%s).' ), 'wp-content' )
    11251124        );
     1125        return;
    11261126    }
    11271127
Note: See TracChangeset for help on using the changeset viewer.