Skip to content

Commit

Permalink
Fixed compatibility issue with latest 3.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Guinn committed Mar 24, 2015
1 parent 20c629f commit fa88e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/PercentageField.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function Type() {
return 'percentage numeric text';
}

public function setValue($val) {
public function setValue($val, $data = array()) {
if (strpos($val, '%') !== false || (double)$val > 1 || (double)$val < -1) {
$val = (double)$val / 100.0;
}
Expand All @@ -31,4 +31,4 @@ public function dataValue() {
public function Value() {
return ($this->dataValue() * 100.0) . '%';
}
}
}

0 comments on commit fa88e0d

Please sign in to comment.