Skip to content

Commit

Permalink
Hack to fix for locale conversion of 0.01 to 0,01
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Mar 27, 2014
1 parent 03a0d8e commit ddd3cb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Modules/input/input_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ public function add_process($process_class,$userid,$inputid,$processid,$arg)
switch ($processtype) {
case ProcessArg::VALUE: // If arg type value
if ($arg == '') return array('success'=>false, 'message'=>'Argument must be a valid number greater or less than 0.');
$arg = floatval($arg);

$arg = (float)$arg;
$arg = str_replace(',','.',$arg); // hack to fix locale issue that converts . to ,

break;
case ProcessArg::INPUTID: // If arg type input
$arg = (int) $arg;
Expand Down

0 comments on commit ddd3cb6

Please sign in to comment.