Make WordPress Core

Changeset 56582


Ignore:
Timestamp:
09/14/2023 10:41:24 AM (3 weeks 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.
Merges [56550] to the 6.3 branch.
Fixes #59320.

Location:
branches/6.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.3

  • branches/6.3/src/wp-admin/includes/class-wp-upgrader.php

    r56174 r56582  
    12071207                $errors->add(
    12081208                    'temp_backup_delete_failed',
    1209                     sprintf( $this->strings['temp_backup_delete_failed'] ),
    1210                     $args['slug']
     1209                    sprintf( $this->strings['temp_backup_delete_failed'], $args['slug'] )
    12111210                );
    12121211                continue;
Note: See TracChangeset for help on using the changeset viewer.