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.
Built from https://develop.svn.wordpress.org/trunk@56550


git-svn-id: http://core.svn.wordpress.org/trunk@56062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
costdev 2023-09-10 07:33:22 +00:00
parent b80ce60f70
commit c170fd62f4
2 changed files with 2 additions and 3 deletions

View File

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

View File

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