Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoryloichot committed May 14, 2024
1 parent fe53050 commit 6f3310f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/Decimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function renderValue($value, \Doku_Renderer $R, $mode)
public function validate($rawvalue)
{
$rawvalue = parent::validate($rawvalue);
$rawvalue = (float)str_replace(',', '.', $rawvalue), 0; // we accept both
$rawvalue = (float) str_replace(',', '.', $rawvalue); // we accept both

if ((string)$rawvalue != (string) $rawvalue) {
throw new ValidationException('Decimal needed');
Expand Down

0 comments on commit 6f3310f

Please sign in to comment.