Make WordPress Core

Changeset 56550 for trunk


Ignore:
Timestamp:
09/10/2023 07:31:47 AM (13 months ago)
Author:
costdev
Message:

Upgrade/Install: Fix broken sprintf() call when deleting a backup.

In WP_Upgrader::delete_temp_backup(), a malformed sprintf() call did not pass the value, triggering a Warning in PHP 7 and a Fatal Error in PHP 8.

This fixes the malformed sprintf() call by correctly passing the value.

Follow-up to [55720].

Props akihiroharai, afragen.
Fixes #59320.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r56521 r56550  
    12081208                $errors->add(
    12091209                    'temp_backup_delete_failed',
    1210                     sprintf( $this->strings['temp_backup_delete_failed'] ),
    1211                     $args['slug']
     1210                    sprintf( $this->strings['temp_backup_delete_failed'], $args['slug'] )
    12121211                );
    12131212                continue;
Note: See TracChangeset for help on using the changeset viewer.