Skip to content

Commit 4d4a479

Browse files
committed
Implicitly cast values to float when formatting as numeric
1 parent 36c18c7 commit 4d4a479

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ protected function compileOutputTag($tag)
13831383
// the # operator at the beginning of an output instructs
13841384
// the complier to call the StringUtil::formatNumeric() method
13851385
elseif ($formatNumeric) {
1386-
$parsedTag = 'wcf\util\StringUtil::formatNumeric(' . $parsedTag . ')';
1386+
$parsedTag = 'wcf\util\StringUtil::formatNumeric((float)' . $parsedTag . ')';
13871387
}
13881388

13891389
return '<?=' . $parsedTag . ';?>';

0 commit comments

Comments
 (0)