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 Aug 22, 2019
1 parent 1aec2ac commit 621f036
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 @@ -212,9 +212,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 @@ -242,9 +242,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 621f036

Please sign in to comment.