diff options
author | Máté Szabó <mszabo@fandom.com> | 2022-07-29 02:45:09 +0200 |
---|---|---|
committer | Máté Szabó <mszabo@fandom.com> | 2022-07-29 02:45:09 +0200 |
commit | 36dd10f9def24ade083048944e7c9d2f76e63c74 (patch) | |
tree | 4909c9f5c1d86b6308c9ee0016ac795cefb9f78b /includes/GlobalFunctions.php | |
parent | 1e18bb3cf6b70cc4acfaf0cf0f382cba33901b11 (diff) | |
download | mediawikicore-36dd10f9def24ade083048944e7c9d2f76e63c74.tar.gz mediawikicore-36dd10f9def24ade083048944e7c9d2f76e63c74.zip |
Migrate use of ${var}-style string interpolation
The "${var}" and "${expr}" style string interpolations are deprecated in
PHP 8.2. Migrate usages in core to "{$var}" as appropriate.
Bug: T314096
Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
Diffstat (limited to 'includes/GlobalFunctions.php')
-rw-r--r-- | includes/GlobalFunctions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5bc36a64b483..2a96554e2c5b 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1575,7 +1575,7 @@ function wfRecursiveRemoveDir( $dir ) { */ function wfPercent( $nr, int $acc = 2, bool $round = true ) { $accForFormat = $acc >= 0 ? $acc : 0; - $ret = sprintf( "%.${accForFormat}f", $nr ); + $ret = sprintf( "%.{$accForFormat}f", $nr ); return $round ? round( (float)$ret, $acc ) . '%' : "$ret%"; } |