Index: trunk/extensions/ParserFunctions/Expr.php |
— | — | @@ -661,7 +661,8 @@ |
662 | 662 | function bcround($strval, $precision = 0) { |
663 | 663 | if (false !== ($pos = strpos($strval, '.')) && |
664 | 664 | ( strlen($strval) - $pos - 1) > $precision ) { |
665 | | - $zeros = str_repeat("0", $precision); |
| 665 | + |
| 666 | + $zeros = ($precision > 0) ? str_repeat("0", $precision) : ''; |
666 | 667 | |
667 | 668 | if ( bccomp( $strval, 0 ) >= 0 ) { |
668 | 669 | return bcadd($strval, "0.{$zeros}5", $precision); |