Skip to content

Commit 2a13d93

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56550 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 54e1b4b commit 2a13d93

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/wp-admin/includes/class-wp-upgrader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,7 @@ public function delete_temp_backup() {
12071207
if ( ! $wp_filesystem->delete( $temp_backup_dir, true ) ) {
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;
12141213
}

0 commit comments

Comments
 (0)