Skip to content

Commit

Permalink
fix(integerfield,floadfield): avoid integrity checks in parseAnswerValue
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 10, 2019
1 parent a7429eb commit 3cbaf61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions inc/fields/floatfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ public function parseAnswerValues($input, $nonDestructive = false) {
if (!is_string($input[$key])) {
return false;
}
if ($input[$key] != (float) str_replace(',', '.', $input[$key])) {
return false;
}
$input[$key] != (float) str_replace(',', '.', $input[$key]);

$this->value = $input[$key];
return true;
Expand Down
4 changes: 1 addition & 3 deletions inc/fields/integerfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ public function parseAnswerValues($input, $nonDestructive = false) {
if (!is_string($input[$key])) {
return false;
}
if ($input[$key] != (int) $input[$key]) {
return false;
}
$input[$key] != (int) $input[$key];

$this->value = $input[$key];
return true;
Expand Down

0 comments on commit 3cbaf61

Please sign in to comment.