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:
@@ -1207,8 +1207,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user