aboutsummaryrefslogtreecommitdiffstats
path: root/includes/GlobalFunctions.php
diff options
context:
space:
mode:
authorMáté Szabó <mszabo@fandom.com>2022-07-29 02:45:09 +0200
committerMáté Szabó <mszabo@fandom.com>2022-07-29 02:45:09 +0200
commit36dd10f9def24ade083048944e7c9d2f76e63c74 (patch)
tree4909c9f5c1d86b6308c9ee0016ac795cefb9f78b /includes/GlobalFunctions.php
parent1e18bb3cf6b70cc4acfaf0cf0f382cba33901b11 (diff)
downloadmediawikicore-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.php2
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%";
}