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.
Merges [56550] to the 6.3 branch.
Fixes #59320.
Built from https://develop.svn.wordpress.org/branches/6.3@56582


git-svn-id: http://core.svn.wordpress.org/branches/6.3@56094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
costdev 2023-09-14 10:43:25 +00:00
parent 7fcf396c9e
commit 1a4de64fdf
2 changed files with 2 additions and 3 deletions

View File

@ -1206,8 +1206,7 @@ class WP_Upgrader {
if ( ! $wp_filesystem->delete( $temp_backup_dir, true ) ) {
$errors->add(
'temp_backup_delete_failed',
sprintf( $this->strings['temp_backup_delete_failed'] ),
$args['slug']
sprintf( $this->strings['temp_backup_delete_failed'], $args['slug'] )
);
continue;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3.2-alpha-56564';
$wp_version = '6.3.2-alpha-56582';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.